Skip to content

Commit

Permalink
MDEV-21586 Server does not start if lc_messages setting was not english.
Browse files Browse the repository at this point in the history
Fixed a bug introduced in  MDEV-11345, server did not start if
non-english error messages were set in startup parameters.

Added lc_messages=de_DE option into an existing test case.
  • Loading branch information
vaintroub committed Jan 30, 2020
1 parent 07e34cd commit f37a56d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mysql-test/r/locale.result
Expand Up @@ -51,7 +51,7 @@ DROP TABLE t1;
#
SET lc_messages=sr_YU;
Warnings:
Warning 1287 'sr_YU' is deprecated and will be removed in a future release. Please use sr_RS instead
Warning 1287 'sr_YU' ist veraltet. Bitte benutzen Sie 'sr_RS'
SHOW VARIABLES LIKE 'lc_messages';
Variable_name Value
lc_messages sr_RS
Expand Down
1 change: 1 addition & 0 deletions mysql-test/t/locale.opt
@@ -0,0 +1 @@
--lc-messages=de_DE
5 changes: 3 additions & 2 deletions sql/derror.cc
Expand Up @@ -84,8 +84,9 @@ bool init_errmessage(void)
if (!use_english)
{
/* Read messages from file. */
use_english= !read_texts(ERRMSG_FILE,lang, &original_error_messages);
error= TRUE;
error= use_english= read_texts(ERRMSG_FILE,lang, &original_error_messages);
if(error)
sql_print_error("Could not load error messages for %s",lang);
}

if (use_english)
Expand Down

0 comments on commit f37a56d

Please sign in to comment.