mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
MDEV-7478 log-basename unpredictable behavior in standalone mode
* fix /etc/init.d/mysql to use log-basename for pid-filename * fix mysqld_safe not to force logging-to-file when log-basename is specified
This commit is contained in:
parent
f007f82881
commit
a34fd50ce1
2 changed files with 15 additions and 2 deletions
|
@ -28,6 +28,7 @@ syslog_tag=
|
|||
user='@MYSQLD_USER@'
|
||||
pid_file=
|
||||
err_log=
|
||||
err_log_base=
|
||||
|
||||
syslog_tag_mysqld=mysqld
|
||||
syslog_tag_mysqld_safe=mysqld_safe
|
||||
|
@ -208,7 +209,7 @@ parse_arguments() {
|
|||
--user=*) user="$val"; SET_USER=1 ;;
|
||||
--log-basename=*|--hostname=*|--loose-log-basename=*)
|
||||
pid_file="$val.pid";
|
||||
err_log="$val.err";
|
||||
err_log_base="$val";
|
||||
;;
|
||||
|
||||
# these might have been set in a [mysqld_safe] section of my.cnf
|
||||
|
@ -577,7 +578,16 @@ then
|
|||
* ) err_log="$DATADIR/$err_log" ;;
|
||||
esac
|
||||
else
|
||||
err_log=$DATADIR/`@HOSTNAME@`.err
|
||||
if [ -n "$err_log_base" ]
|
||||
then
|
||||
err_log=$err_log_base.err
|
||||
case "$err_log" in
|
||||
/* ) ;;
|
||||
* ) err_log="$DATADIR/$err_log" ;;
|
||||
esac
|
||||
else
|
||||
err_log=$DATADIR/`@HOSTNAME@`.err
|
||||
fi
|
||||
fi
|
||||
|
||||
append_arg_to_args "--log-error=$err_log"
|
||||
|
|
|
@ -146,6 +146,9 @@ parse_server_arguments() {
|
|||
--datadir=*) datadir=`echo "$arg" | sed -e 's/^[^=]*=//'`
|
||||
datadir_set=1
|
||||
;;
|
||||
--log-basename=*|--hostname=*|--loose-log-basename=*)
|
||||
mysqld_pid_file_path=`echo "$arg.pid" | sed -e 's/^[^=]*=//'`
|
||||
;;
|
||||
--pid-file=*) mysqld_pid_file_path=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
|
||||
--service-startup-timeout=*) service_startup_timeout=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
|
||||
esac
|
||||
|
|
Loading…
Reference in a new issue