From 9486aaeffa54583fa1b76bb63ffbd310bf06fa31 Mon Sep 17 00:00:00 2001 From: Jon Olav Hauglid Date: Thu, 16 May 2013 08:09:48 +0200 Subject: Bug#16807394: PREVENT NEW ERROR MESSAGES FROM BEING ADDED TO 5.5 In order to keep error message numbers stable between GA releases, we can not now add a new error message to 5.1/5.5 as this message would get a number now used in 5.6. This patch enforces this by adding a 5.1/5.5 specific check when processing the error message file. If a new error message is added, building will abort and report an error. --- extra/comp_err.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'extra') diff --git a/extra/comp_err.c b/extra/comp_err.c index 895524ac453..267e850ba50 100644 --- a/extra/comp_err.c +++ b/extra/comp_err.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -31,6 +31,7 @@ #include #include #include +#include #define MAX_ROWS 1000 #define HEADER_LENGTH 32 /* Length of header in errmsg.sys */ @@ -175,6 +176,23 @@ int main(int argc, char *argv[]) fprintf(stderr, "Failed to parse input file %s\n", TXTFILE); DBUG_RETURN(1); } +#if MYSQL_VERSION_ID >= 50100 && MYSQL_VERSION_ID < 50500 +/* Number of error messages in 5.1 - do not change this number! */ +#define MYSQL_OLD_GA_ERROR_MESSAGE_COUNT 641 +#elif MYSQL_VERSION_ID >= 50500 && MYSQL_VERSION_ID < 50600 +/* Number of error messages in 5.5 - do not change this number! */ +#define MYSQL_OLD_GA_ERROR_MESSAGE_COUNT 728 +#endif +#if MYSQL_OLD_GA_ERROR_MESSAGE_COUNT + if (row_count != MYSQL_OLD_GA_ERROR_MESSAGE_COUNT) + { + fprintf(stderr, "Can only add new error messages to latest GA. "); + fprintf(stderr, "Use ER_UNKNOWN_ERROR instead.\n"); + fprintf(stderr, "Expected %u messages, found %u.\n", + MYSQL_OLD_GA_ERROR_MESSAGE_COUNT, row_count); + DBUG_RETURN(1); + } +#endif if (lang_head == NULL || error_head == NULL) { fprintf(stderr, "Failed to parse input file %s\n", TXTFILE); -- cgit v1.2.1 From 42f56557f59705aeec83a54f02399b04d52e9eea Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 9 Sep 2013 19:31:29 +0200 Subject: MDEV-4941 make: AIX fails with 'Identifier not allowed in cast'; syntax error in include/my_global.h C++ comments in C files, and a typo in my_global.h --- extra/perror.c | 1 - 1 file changed, 1 deletion(-) (limited to 'extra') diff --git a/extra/perror.c b/extra/perror.c index de8a9b8a0c3..c4ee6087d50 100644 --- a/extra/perror.c +++ b/extra/perror.c @@ -34,7 +34,6 @@ static my_bool verbose, print_all_codes; #include "../include/my_base.h" #include "../mysys/my_handler_errors.h" -// #include "../include/my_compare.h" #ifdef WITH_NDBCLUSTER_STORAGE_ENGINE static my_bool ndb_code; -- cgit v1.2.1