Description:
With MySQL 5.1.67 and 5.5.29 a change was introduced in ./bin/mysqld_safe script and now it fails on Solaris 5.10
mysqld_safe first script line is using the sh shell:
#!/bin/sh
faulty line later on:
if [ ! -e "$err_log" ]; then # if error log already exists,
touch "$err_log" # we just append. otherwise,
chmod "$fmode" "$err_log" # fix the permissions here!
fi
For /bin/sh the "-e" is an unsupported test option because Solaris man page for "test":
http://docs.oracle.com/cd/E19253-01/816-5165/6mbb0m9tk/index.html
-e file
True if file exists. (Not available in sh.)
-f file
True if file exists and is a regular file. Alternatively, if /usr/bin/sh users specify /usr/ucb before /usr/bin in their PATH environment variable, then test will return true if file exists and is (not-a-directory). The csh test and [ built-ins always use this alternative behavior.
After changing the
if [ ! -e "$err_log" ]; then
into
if [ ! -f "$err_log" ]; then
it works agin
How to repeat:
try to start mysql with ./bin/mysqld_safe script
Suggested fix:
It looks like the change was already done according to that entry, but it is not known as new bug id
http://lists.mysql.com/commits/145550
4133 Nirbhay Choubey 2012-12-27 [merge]
Merge of patch for Bug#16046140 from mysql-5.1.
modified:
scripts/mysqld_safe.sh
4132 Mattias Jonsson 2012-12-27 [merge]
merge
- if [ ! -e "$err_log" ]; then # if error log already exists,
+ if [ ! -f "$err_log" ]; then # if error log already exists,