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)
This commit is contained in:
parent
0ed9e3eb4c
commit
63dd4251e4
@ -289,6 +289,25 @@ then
|
|||||||
syslog=0
|
syslog=0
|
||||||
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
|
||||||
|
# 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@}}
|
safe_mysql_unix_port=${mysql_unix_port:-${MYSQL_UNIX_PORT:-@MYSQL_UNIX_ADDR@}}
|
||||||
# Make sure that directory for $safe_mysql_unix_port exists
|
# Make sure that directory for $safe_mysql_unix_port exists
|
||||||
mysql_unix_port_dir=`dirname $safe_mysql_unix_port`
|
mysql_unix_port_dir=`dirname $safe_mysql_unix_port`
|
||||||
@ -387,22 +406,6 @@ else
|
|||||||
fi
|
fi
|
||||||
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
|
# 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.
|
# don't specify a hard limit on core file size.
|
||||||
if test -n "$core_file_size"
|
if test -n "$core_file_size"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user