Bug #41749 No errors in server logfile when started with wrong errmsg.sys
Submitted: 25 Dec 2008 19:45 Modified: 26 Dec 2008 11:38
Reporter: Anders Karlsson Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Errors Severity:S3 (Non-critical)
Version:5.1.30 OS:Microsoft Windows (XP)
Assigned to: CPU Architecture:Any
Triage: Triaged: D5 (Feature request)

[25 Dec 2008 19:45] Anders Karlsson
Description:
When the language file errmsg.sys is in error or corrupt, there are errors reported and the server will not start, which is probably correct. If it wasn't for the fact that these errors doesn't end up in the server errorfile, at least not on Windows, instead these end up on stderr / stdout.
If the server is started as a service on Windows and the err,sg.sys file has an error, the server will not start, and there is no information at all in the server error log, not even to the effect that the server didn't start. Also, the service manager says the service starts, but it doesn't, which is different from, say, when a my.ini parameter has an error.

How to repeat:
Copy an old or broken errmsg.sys file into the <mysql path>\share\english catalog (or some other appropriate message directory) on Windows. Start the service from the Windows Services Manager. The services will not start and no messages will be seen.

If you now start the server from the commandline instead you see what has happened, for example (assuming I start the server with the appropriate --defailts-file option):
081225 20:39:37 [ERROR] Error message file 'D:\MySQL5130\share\english\errmsg.sys' had only 303 error messages, but it should contain at least 617 error messages. Check that the above file is the right version for this program!
[26 Dec 2008 5:26] Valeriy Kravchuk
Error messages in this case are added to Control Panel ... Event Viewer | Application log. I think this is normal for services on Windows. Please, check.
[26 Dec 2008 11:36] Anders Karlsson
Yes, this is true, I have to admit I didn't check that. All the same, I still think this should go into the MySQL Error log. Other errors do. Note that the service manager "thinks" the service has started, although it has not. This will surely reduce the serverity of this issue though.

Testing more, I realized that errors during MySQL startup can apperar in three different ways, which is something that should be cleaned up:
1) Errors in the MySQL Error log only.
2) Errors in a dialog box from the service manager when MySQL starts (so far this means that there is ALSO an error in the MySQL Error log).
3) Errors information in the event log (so far, the only such I have seen is the above mentioned problem with errmsg.sys).

In addition, there is always information in the event log, mostly uninteresting, mostly too many messages (always 3) and often these are emoty.

This call for a worklog from yours truly on how we should deal with MySQL startup errors on the windows (and possibly also other) platforms. As for this particular bug, it can probably be closed or set to feature request. It is useful as a note for future reference I guess.