MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Alexander Barkov Date:July 20 2009 10:46am
Subject:bzr commit into mysql-5.4 branch (bar:2825) WL#751
View as plain text  
#At file:///home/bar/mysql-bzr/mysql-azalea-alik/ based on revid:alik@stripped

 2825 Alexander Barkov	2009-07-20
      A postfix for WL#751 Error message construction
      Fixes the problems reported in:
      
      Bug#46218 MySQL 5.4.4 won't start in 5.1 environment
      Bug#46236 mysqld no longer respects the --language startup option
      Bug#46221 MySQL 5.4.4 starts even if it can't find the message file

    modified:
      sql/derror.cc
      sql/mysqld.cc
=== modified file 'sql/derror.cc'
--- a/sql/derror.cc	2009-07-03 05:54:09 +0000
+++ b/sql/derror.cc	2009-07-20 10:44:29 +0000
@@ -111,7 +111,20 @@ bool read_texts(const char *file_name, c
                               lang_path, "", 4),
 		    O_RDONLY | O_SHARE | O_BINARY,
 		    MYF(0))) < 0)
-    goto err; /* purecov: inspected */
+  {
+    /*
+      Trying pre-5.4 sematics of the --language parameter.
+      It included the language-specific part, e.g.:
+      
+      --language=/path/to/english/
+    */
+    if ((file= my_open(fn_format(name, file_name, lc_messages_dir, "", 4),
+                       O_RDONLY | O_SHARE | O_BINARY,
+                       MYF(0))) < 0)
+      goto err;
+    sql_print_error("An old style --language value with language specific part detected: %s", lc_messages_dir);
+    sql_print_error("Use --lc-messages-dir without language specific part instead.");
+  }
 
   funktpos=1;
   if (my_read(file,(uchar*) head,32,MYF(MY_NABP))) goto err;

=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2009-07-10 12:31:32 +0000
+++ b/sql/mysqld.cc	2009-07-20 10:44:29 +0000
@@ -4176,6 +4176,10 @@ will be ignored as the --log-bin option 
     }
   }
 
+  /* if the errmsg.sys is not loaded, terminate to maintain behaviour */
+  if (!DEFAULT_ERRMSGS[0][0])
+    unireg_abort(1);
+  
   /* We have to initialize the storage engines before CSV logging */
   if (ha_init())
   {
@@ -6170,6 +6174,11 @@ Disable with --skip-large-pages.",
   {"init-slave", OPT_INIT_SLAVE, "Command(s) that are executed when a slave connects to this master",
    (uchar**) &opt_init_slave, (uchar**) &opt_init_slave, 0, GET_STR_ALLOC,
    REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+  {"language", 'L',
+   "Client error messages in given language. May be given as a full path. "
+   "Deprecated. Use --lc-messages-dir instead.",
+   (uchar**) &lc_messages_dir_ptr, (uchar**) &lc_messages_dir_ptr, 0,
+   GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
   {"lc-messages-dir", 'L',
    "Directory where error messages are.", (uchar**) &lc_messages_dir_ptr,
    (uchar**) &lc_messages_dir_ptr, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},


Attachment: [text/bzr-bundle] bzr/bar@mysql.com-20090720104429-2bvcjdplhl9gfsjh.bundle
Thread
bzr commit into mysql-5.4 branch (bar:2825) WL#751Alexander Barkov20 Jul