From 634f9186922d0decb597178fda15928d2b22f062 Mon Sep 17 00:00:00 2001 From: Monty Date: Tue, 18 Apr 2017 12:16:34 +0300 Subject: [PATCH] Add multiple parsing protection to include/mysqld_error.h --- extra/comp_err.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extra/comp_err.c b/extra/comp_err.c index cf6262f66e2..5e3cec676bc 100644 --- a/extra/comp_err.c +++ b/extra/comp_err.c @@ -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));