summaryrefslogtreecommitdiff
path: root/scripts/mysqld_safe.sh
diff options
context:
space:
mode:
authorunknown <tsmith@sita.local>2007-07-09 16:10:43 -0600
committerunknown <tsmith@sita.local>2007-07-09 16:10:43 -0600
commitd66bf1f78590a294e05509950df5a5d02b6a08ef (patch)
treea81f3debaea9d0f56cb30d11718f8a109b5f0bfb /scripts/mysqld_safe.sh
parent63846933f0ea255a9552028f47cb786ea50fb6f0 (diff)
downloadmariadb-git-d66bf1f78590a294e05509950df5a5d02b6a08ef.tar.gz
Bug #29634: mysqld_safe does not set err_log variable, error log file is not created
Dont touch & chmod the err_log file if using syslog (mysqld_safe) scripts/mysqld_safe.sh: Dont touch & chmod the err_log file if using syslog
Diffstat (limited to 'scripts/mysqld_safe.sh')
-rw-r--r--scripts/mysqld_safe.sh35
1 files changed, 19 insertions, 16 deletions
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index 987c714d3ff..597bf38a518 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -289,6 +289,25 @@ then
syslog=0
fi
+USER_OPTION=""
+if test -w / -o "$USER" = "root"
+then
+ if test "$user" != "root" -o $SET_USER = 1
+ then
+ USER_OPTION="--user=$user"
+ fi
+ # Change the err log to the right user, if it is in use
+ if [ $syslog -eq 0 ]; then
+ touch $err_log
+ chown $user $err_log
+ fi
+ if test -n "$open_files"
+ then
+ ulimit -n $open_files
+ append_arg_to_args "--open-files-limit=$open_files"
+ fi
+fi
+
safe_mysql_unix_port=${mysql_unix_port:-${MYSQL_UNIX_PORT:-@MYSQL_UNIX_ADDR@}}
# Make sure that directory for $safe_mysql_unix_port exists
mysql_unix_port_dir=`dirname $safe_mysql_unix_port`
@@ -387,22 +406,6 @@ else
fi
fi
-USER_OPTION=""
-if test -w / -o "$USER" = "root"
-then
- if test "$user" != "root" -o $SET_USER = 1
- then
- USER_OPTION="--user=$user"
- fi
- # If we are root, change the err log to the right user.
- touch $err_log; chown $user $err_log
- if test -n "$open_files"
- then
- ulimit -n $open_files
- append_arg_to_args "--open-files-limit=$open_files"
- fi
-fi
-
# Try to set the core file size (even if we aren't root) because many systems
# don't specify a hard limit on core file size.
if test -n "$core_file_size"