summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJim Winstead <jimw@mysql.com>2009-05-07 17:25:23 -0700
committerJim Winstead <jimw@mysql.com>2009-05-07 17:25:23 -0700
commitcc3f48b2e19fae758dfef659ea277cd564bec4ca (patch)
tree39899402b759776515e5a593eab8f10e3fc5b246 /scripts
parent9345dbba6fdb3ef21b72db03ce38ca832154c235 (diff)
downloadmariadb-git-cc3f48b2e19fae758dfef659ea277cd564bec4ca.tar.gz
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)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysqld_safe.sh16
1 files changed, 8 insertions, 8 deletions
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index 960c3e39bab..34dc019a82a 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -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 < /dev/null"
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