Bug #77498 | mysqld_safe fails to restart mysqld if init_file is used | ||
---|---|---|---|
Submitted: | 26 Jun 2015 7:43 | Modified: | 28 Oct 2015 10:25 |
Reporter: | Daniël van Eeden (OCA) | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Options | Severity: | S2 (Serious) |
Version: | 5.6.25, 5.6.26 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[26 Jun 2015 7:43]
Daniël van Eeden
[26 Jun 2015 8:36]
MySQL Verification Team
Hello Daniël, Thank you for the report. Thanks, Umesh
[26 Jun 2015 8:36]
MySQL Verification Team
// 5.6.26 2015-06-26 10:33:22 19522 [Note] Execution of init_file '/tmp/test.sql' started. 2015-06-26 10:33:22 19522 [ERROR] /export/umesh/server/binaries/mysql-5.6.26/bin/mysqld: File '/tmp/test.sql' not found (Errcode: 2 - No such file or directory) 2015-06-26 10:33:22 19522 [ERROR] Aborting
[28 Oct 2015 8:51]
Shishir Jaiswal
The main role of mysqld_safe script is to restart the server when an error occurs. If the option "init_file" (or any other option which is known to just mysqld and not to script mysqld_safe) is passed via command line or is mentioned in my.cnf file under [mysqld], mysqld_safe has to pass it to mysqld. When mysqld is killed here, mysqld_safe tries to restart the server by passing all the options (including --init_file= /tmp/test.sql option) to mysqld "as is". On finding this "init_file" to be absent, mysqld throws an error and brings itself down. Its logically correct that mysqld_safe aborts restarting mysqld if the latter has once failed to start due to some critical error. Since "init_file" contains the set of commands which *has to* be executed everytime the server comes up, ignoring this error (mentioned under "Suggested fix") is not a good idea. For reference: https://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_init_file According to me this is an expected behaviour and not a bug . For once, it would have been a bug if the behaviour was different (mentioned under "Suggested Fix" as, "Make the behaviour similar to when init_file is set in my.cnf") between command line and my.cnf file, but this is not the case as confirmed internally.