Bug #46221 MySQL 5.4.4 starts even if it can't find the message file
Submitted: 16 Jul 2009 13:44 Modified: 7 Aug 2009 16:11
Reporter: Konstantin Osipov (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Errors Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Alexander Barkov CPU Architecture:Any
Tags: regression

[16 Jul 2009 13:44] Konstantin Osipov
Description:
MySQL 5.4.4 (azalea) starts even with no message file.
5.1 would refuse to do that.
This is a regression introduced by WL#751, and is not documented in worklog
specification.

How to repeat:
Compile MySQL 5.4.4 (azalea) with ./BUILD/compile-* script, e.g.
BUILD/compile-pentium-valgrind-max.

Use the following configuration file:

[mysql]
# The following options will be passed to all MySQL clients
[client]
port        = 3307
host        = 127.0.0.1

[mysqld]
socket=/opt/local/var/mysql/mysql.sock
port=3307
character-sets-dir=/home/kostja/work/5.4-azalea/sql/share/charsets
basedir=/home/kostja/work/5.4-azalea
datadir=/opt/local/var/mysql

Observe that the server starts while printing this:

kostja@shakti:~/work/5.4-azalea/sql$ ./mysqld 
090716 17:29:40 [ERROR] Can't find messagefile '/opt/local/work/5.4-azalea/share/mysql/english/errmsg.sys'
090716 17:29:40 [Note] Plugin 'FEDERATED' is disabled.
090716 17:29:40 [Note] Plugin 'InnoDB' is disabled.
090716 17:29:40 [Note] Plugin 'ndbcluster' is disabled.
090716 17:29:40 [ERROR] 
090716 17:29:40 [ERROR] Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
090716 17:29:40 [Note] 

However, if you try to do the same stunt with 5.1, it refuses to start:

Configuration file:

[mysql]
# The following options will be passed to all MySQL clients
[client]
port        = 3307
host        = 127.0.0.1
[mysqld]
socket=/opt/local/var/mysql/mysql.sock
port=3307
character-sets-dir=/home/kostja/work/5.1-bugteam/sql/share/charsets
basedir=/home/kostja/work/5.1-bugteam
datadir=/opt/local/var/mysql

Output at start up:

kostja@shakti:~/work/5.1-bugteam/sql$ ./mysqld 
090716 17:40:31 [ERROR] Can't find messagefile '/opt/local/work/5.1-bugteam/share/mysql/english/errmsg.sys'
090716 17:40:31 [Note] Plugin 'FEDERATED' is disabled.
090716 17:40:31 [Note] Plugin 'InnoDB' is disabled.
090716 17:40:31 [Note] Plugin 'ndbcluster' is disabled.
090716 17:40:31 [ERROR] Aborting

When you connect to this "crippled" 5.4 server later on,
and try to issue SQL statements, you get funny effects:

kostja@shakti:~$ mysql test
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.4.4-alpha-valgrind-max-debug Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> drop table t1;
ERROR 1051 (42S02):

It could perhaps crash, I haven't checked.

Suggested fix:
Restore 5.1 behaviour.
[16 Jul 2009 14:22] MySQL Verification Team
Thank you for the bug report. Verified as described.

miguel@lara:~/dbs/azalea$ libexec/mysqld --defaults-file=/home/miguel/dbs/azalea/my.cnf
090716 11:20:49 [ERROR] Can't find messagefile '/home/miguel/dbs/azalea/share/mysql/english/errmsg.sys'
090716 11:20:49 [Note] Plugin 'FEDERATED' is disabled.
090716 11:20:49 [Note] Plugin 'ndbcluster' is disabled.
090716 11:20:49  InnoDB: Started; log sequence number 0 46409
090716 11:20:49 [Note] Event Scheduler: Loaded 0 events
090716 11:20:49 [Note]
[23 Jul 2009 10:24] Bugs System
Pushed into 5.4.4-alpha (revid:alik@sun.com-20090723102221-ps4uaphwbxzj8p0q) (version source revid:bar@mysql.com-20090721083750-oput8niky7meuyjd) (merge vers: 5.4.4-alpha) (pib:11)
[6 Aug 2009 4:00] Alexander Barkov
This bug was fixed by a join patch for Bug#46218:

http://lists.mysql.com/commits/78995

> "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
[7 Aug 2009 16:11] Paul DuBois
Bug does not appear in any released version, but the change in the way of specifying the location of the error message file is described here:

http://dev.mysql.com/doc/refman/5.4/en/error-message-language.html