diff options
author | Monty <monty@mariadb.org> | 2016-04-05 16:52:40 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2016-04-05 18:00:03 +0300 |
commit | d0b178fb45898486979a504de30ac186f734bb26 (patch) | |
tree | 7a78d5c3ecc02319615042a598a7530099cb217b /unittest | |
parent | 38f39a9288dc826ac16ac81a67a4e3174451825d (diff) | |
download | mariadb-git-d0b178fb45898486979a504de30ac186f734bb26.tar.gz |
Added new range of MariaDB error messages, starting from 3000
This is done by splitting variables.errmsg and locale.errmsg to
variables.errmsg_extra and locale.errmsg_extra
The ER() macros in unireg.h now looks more complex than before, but this
isn't critical as most usage of them are with constants and the compiler
will remove most of the test code.
Diffstat (limited to 'unittest')
-rw-r--r-- | unittest/sql/explain_filename-t.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/unittest/sql/explain_filename-t.cc b/unittest/sql/explain_filename-t.cc index 69ce51c0446..a737ebec608 100644 --- a/unittest/sql/explain_filename-t.cc +++ b/unittest/sql/explain_filename-t.cc @@ -26,7 +26,8 @@ char to[BUFLEN]; char from[BUFLEN]; -const char *error_messages[1000]; +static const char *error_messages_txt[1000]; +static const char **error_messages[1]= { error_messages_txt }; int setup() { @@ -34,12 +35,12 @@ int setup() my_default_lc_messages = &my_locale_en_US; /* Populate the necessary error messages */ - error_messages[ER_DATABASE_NAME - ER_ERROR_FIRST] = "Database"; - error_messages[ER_TABLE_NAME - ER_ERROR_FIRST] = "Table"; - error_messages[ER_PARTITION_NAME - ER_ERROR_FIRST] = "Partition"; - error_messages[ER_SUBPARTITION_NAME - ER_ERROR_FIRST] = "Subpartition"; - error_messages[ER_TEMPORARY_NAME - ER_ERROR_FIRST] = "Temporary"; - error_messages[ER_RENAMED_NAME - ER_ERROR_FIRST] = "Renamed"; + error_messages[0][ER_DATABASE_NAME - ER_ERROR_FIRST] = "Database"; + error_messages[0][ER_TABLE_NAME - ER_ERROR_FIRST] = "Table"; + error_messages[0][ER_PARTITION_NAME - ER_ERROR_FIRST] = "Partition"; + error_messages[0][ER_SUBPARTITION_NAME - ER_ERROR_FIRST] = "Subpartition"; + error_messages[0][ER_TEMPORARY_NAME - ER_ERROR_FIRST] = "Temporary"; + error_messages[0][ER_RENAMED_NAME - ER_ERROR_FIRST] = "Renamed"; my_default_lc_messages->errmsgs->errmsgs = error_messages; |