Bug #54991 mysqld_safe reports syntax error and skips part of logic while restarting server
Submitted: 4 Jul 2010 20:19 Modified: 11 Aug 2010 12:31
Reporter: Elena Stepanova Email Updates:
Status: Closed Impact on me:
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.5.5-m3 OS:Any
Assigned to: CPU Architecture:Any
Tags: regression

[4 Jul 2010 20:19] Elena Stepanova
If mysqld died, while restarting it, mysqld_safe complains about the error:
bin/mysqld_safe: line 730: 1: command not found

(in case of Solaris it would be "0: command not found").

I'm using bash 3.x.

"1" or "0" is what @TARGET_LINUX@ now resolves into, instead of previous "true" or "false".  

The full condition in mysqld_safe.sh is
if @TARGET_LINUX@ && test $KILL_MYSQLD -eq 1
and it opens a branch which checks for running processes and kills redundant ones.
Now the first part of condition fails due to the error, and the branch is never entered.

In 5.5.4 and earlier the values are still "true" and "false", and the script runs smoothly.

How to repeat:
Start MySQL server using mysqld_safe;
Kill MySQL server with SIGKILL;
Observe mysqld_safe output.

Or inspect the script code.
[5 Jul 2010 11:55] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:


3092 Jonathan Perkin	2010-07-05
      bug#54991: mysqld_safe reports syntax error and skips part of logic
                 while restarting server
      TARGET_LINUX must be 'true' or 'false'.
[19 Jul 2010 10:15] Bugs System
Pushed into 5.5.6-m3 (revid:build@mysql.com-20100719101001-0ykgx8ceoq7s458e) (version source revid:build@mysql.com-20100719101001-0ykgx8ceoq7s458e) (merge vers: 5.5.6-m3) (pib:16)
[23 Jul 2010 12:35] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100723121929-90e9zemk3jkr2ocy) (version source revid:vasil.dimov@oracle.com-20100531152341-x2d4hma644icamh1) (pib:18)
[11 Aug 2010 9:28] Alexander Nozdrin
Pushed to mysql-5.5 some time ago.
[11 Aug 2010 12:31] Paul DuBois
Noted in 5.5.6 changelog.

mysqld_safe contained a syntax error that prevented it from
restarting the server.