mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
Add multiple parsing protection to include/mysqld_error.h
This commit is contained in:
parent
a30c225e53
commit
634f918692
1 changed files with 2 additions and 0 deletions
|
@ -267,6 +267,7 @@ static int create_header_files(struct errors *error_head)
|
|||
fprintf(sql_statef, "/* Autogenerated file, please don't edit */\n\n");
|
||||
fprintf(er_namef, "/* Autogenerated file, please don't edit */\n\n");
|
||||
|
||||
fprintf(er_definef, "#ifndef ER_ERROR_FIRST\n");
|
||||
fprintf(er_definef, "#define ER_ERROR_FIRST %d\n", error_head->d_code);
|
||||
|
||||
current_d_code= error_head->d_code -1;
|
||||
|
@ -314,6 +315,7 @@ static int create_header_files(struct errors *error_head)
|
|||
}
|
||||
/* finishing off with mysqld_error.h */
|
||||
fprintf(er_definef, "#define ER_ERROR_LAST %d\n", er_last);
|
||||
fprintf(er_definef, "#endif /* ER_ERROR_FIRST */\n");
|
||||
my_fclose(er_definef, MYF(0));
|
||||
my_fclose(sql_statef, MYF(0));
|
||||
my_fclose(er_namef, MYF(0));
|
||||
|
|
Loading…
Reference in a new issue