summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorJon Olav Hauglid <jon.hauglid@oracle.com>2013-05-16 09:01:11 +0200
committerJon Olav Hauglid <jon.hauglid@oracle.com>2013-05-16 09:01:11 +0200
commitf6fe1a1a8171620cde2991c3406ff730b7bf8ab7 (patch)
tree698c1f17d2f90db69ffcdbff0421dcee3e155a51 /extra
parent15f8bde727b281159c9383a6e36736aaf1905e8d (diff)
parentf1341a1d88445999146f27983b43de5bd5626339 (diff)
downloadmariadb-git-f6fe1a1a8171620cde2991c3406ff730b7bf8ab7.tar.gz
Merge from mysql-5.1 to mysql-5.5
Diffstat (limited to 'extra')
-rw-r--r--extra/comp_err.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/extra/comp_err.c b/extra/comp_err.c
index bf100fdef85..b6ed2bee118 100644
--- a/extra/comp_err.c
+++ b/extra/comp_err.c
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2000, 2011, 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 <my_getopt.h>
#include <assert.h>
#include <my_dir.h>
+#include <mysql_version.h>
#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);