Bug #62559 mysqld_multi doesn't check pid-file
Submitted: 28 Sep 2011 8:23 Modified: 28 Sep 2011 10:07
Reporter: Daniël van Eeden Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S2 (Serious)
Version:5.5.15, 5.5.17 OS:Linux (SUSE Linux Enterprise Server 11 (x86_64))
Assigned to: CPU Architecture:Any
Tags: Contribution

[28 Sep 2011 8:23] Daniël van Eeden
Description:
The mysqld_multi command doesn't check the pid-file and starts instances multiple times.

How to repeat:
db2:~ # mysqld_multi report
Reporting MySQL servers
MySQL server from group: mysqld2 is not running
db2:~ # pgrep -x mysqld
db2:~ # mysqld_multi start 2
db2:~ # mysqld_multi report
Reporting MySQL servers
MySQL server from group: mysqld2 is running
db2:~ # pgrep -x mysqld
5844
db2:~ # mysqld_multi start 2
db2:~ # mysqld_multi report
Reporting MySQL servers
MySQL server from group: mysqld2 is not running
db2:~ # pgrep -x mysqld
5844
6430

Suggested fix:
Do not start an instance if the pid-file exits
[28 Sep 2011 8:23] Daniël van Eeden
Patch for Bug #62559

Attachment: mysqld_multi_pidcheck.patch (text/x-patch), 898 bytes.

[28 Sep 2011 10:07] Valeriy Kravchuk
Thank you for the problem report and patch contributed.
[18 Feb 2014 15:04] Daniël van Eeden
Also present in 5.6.16