Add multiple parsing protection to include/mysqld_error.h

This commit is contained in:
Monty 2017-04-18 12:16:34 +03:00
parent a30c225e53
commit 634f918692

View file

@ -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));