#At file:///Users/jimw/my/mysql-5.1/ based on revid:jimw@stripped
2890 Jim Winstead 2009-05-07
mysqld_safe could generate filenames with spaces and then didn't properly
quote them in later use. (Bug #33685, based on a patch by Hartmut Holzgraefe)
modified:
scripts/mysqld_safe.sh
=== modified file 'scripts/mysqld_safe.sh'
--- a/scripts/mysqld_safe.sh 2009-03-16 19:28:06 +0000
+++ b/scripts/mysqld_safe.sh 2009-05-08 00:25:23 +0000
@@ -391,8 +391,8 @@ then
fi
# Change the err log to the right user, if it is in use
if [ $want_syslog -eq 0 ]; then
- touch $err_log
- chown $user $err_log
+ touch "$err_log"
+ chown $user "$err_log"
fi
if test -n "$open_files"
then
@@ -509,9 +509,9 @@ fi
#
# If there exists an old pid file, check if the daemon is already running
# Note: The switches to 'ps' may depend on your operating system
-if test -f $pid_file
+if test -f "$pid_file"
then
- PID=`cat $pid_file`
+ PID=`cat "$pid_file"`
if @CHECK_PID@
then
if @FIND_PROC@
@@ -520,8 +520,8 @@ then
exit 1
fi
fi
- rm -f $pid_file
- if test -f $pid_file
+ rm -f "$pid_file"
+ if test -f "$pid_file"
then
log_error "Fatal error: Can't remove the pid file:
$pid_file
@@ -563,11 +563,11 @@ test -n "$NOHUP_NICENESS" && cmd="$cmd <
log_notice "Starting $MYSQLD daemon with databases from $DATADIR"
while true
do
- rm -f $safe_mysql_unix_port $pid_file # Some extra safety
+ rm -f $safe_mysql_unix_port "$pid_file" # Some extra safety
eval_log_error "$cmd"
- if test ! -f $pid_file # This is removed if normal shutdown
+ if test ! -f "$pid_file" # This is removed if normal shutdown
then
break
fi
| Thread |
|---|
| • bzr commit into mysql-5.1-bugteam branch (jimw:2890) Bug#33685 | Jim Winstead | 8 May |