Bug #67576 | Misleading messages at startup time | ||
---|---|---|---|
Submitted: | 13 Nov 2012 0:48 | Modified: | 16 Jul 2013 16:36 |
Reporter: | Tianyin Xu | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Errors | Severity: | S3 (Non-critical) |
Version: | mysql-5.5.28 | OS: | Linux (Ubuntu-12.04) |
Assigned to: | CPU Architecture: | Any | |
Tags: | configuration, Contribution, lc-messages-dir, messagefile |
[13 Nov 2012 0:48]
Tianyin Xu
[13 Nov 2012 3:20]
Tianyin Xu
Osh, the patch attached in the previous email is not correct. Check out this new one! --- ../mysql-5.5.28_org/mysql-5.5.28/sql/derror.cc 2012-08-29 01:50:46.000000000 -0700 +++ sql/derror.cc 2012-11-12 19:14:14.075581201 -0800 @@ -108,6 +108,7 @@ uchar *buff; uchar head[32],*pos; DBUG_ENTER("read_texts"); + bool ostyle = false; LINT_INIT(buff); funktpos=0; @@ -129,8 +130,8 @@ 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."); + + ostyle = true; } funktpos=1; @@ -140,6 +141,11 @@ head[2] != 2 || head[3] != 1) goto err; /* purecov: inspected */ textcount=head[4]; + + if(ostyle) { + 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."); + } error_message_charset_info= system_charset_info; length=uint2korr(head+6); count=uint2korr(head+8); @@ -185,7 +191,7 @@ err: sql_print_error((funktpos == 2) ? "Not enough memory for messagefile '%s'" : ((funktpos == 1) ? "Can't read from messagefile '%s'" : - "Can't find messagefile '%s'"), name); + "Can't find messagefile '%s'! Please check the 'lc-messages-dir' configuration directive."), name); if (file != FERR) (void) mysql_file_close(file, MYF(MY_WME)); DBUG_RETURN(1);
[13 Nov 2012 3:27]
Tianyin Xu
patch
Attachment: lc.patch (text/x-patch), 1.55 KiB.
[13 Nov 2012 17:40]
Sveta Smirnova
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on how to report a bug at http://bugs.mysql.com/how-to-report.php You should not create empty errmsg.sys file, but point to proper one from your installation. Most likely --lc-messages-dir=mysql_installation_path/share
[13 Nov 2012 18:12]
Tianyin Xu
Hi, Sveta, Thanks for your reply. It's not a bug (won't crash the system), but a bad message which misleads users. What I mainly proposed is to improve the quality of the log message "Can't find messagefile XXX" by explicitly telling which configuration directive is wrong (fortunately, in this case, we can). So that users can immediately know the problem. This can save a lot of time for users. I think it does make sense.
[15 Nov 2012 19:47]
Sveta Smirnova
Thank you for the feedback. Got your point: verified as described.
[15 Nov 2012 21:57]
Tianyin Xu
Thanks a lot, Sveta! T
[16 Jul 2013 16:36]
Paul DuBois
Noted in 5.7.2 changelog. If the server could not find the errmsg.sys file at startup, the resulting error message did not indicate which configuration parameter to check.