1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-8374 - Debian: mysqld_safe Can't log to error log and syslog at the same time

Let mysqld_safe_syslog.cnf force disable error log so that logging to syslog is
not affected by previous log_error setting.

Added handling of --skip-log-error to mysqld_safe.
This commit is contained in:
Sergey Vojtovich
2015-06-30 18:01:40 +04:00
parent 6efdc398ba
commit 94bc50650e
2 changed files with 15 additions and 1 deletions

View File

@ -29,6 +29,7 @@ user='@MYSQLD_USER@'
pid_file=
err_log=
err_log_base=
skip_err_log=0
syslog_tag_mysqld=mysqld
syslog_tag_mysqld_safe=mysqld_safe
@ -208,7 +209,14 @@ parse_arguments() {
# these might have been set in a [mysqld_safe] section of my.cnf
# they are added to mysqld command line to override settings from my.cnf
--log[-_]error=*) err_log="$val" ;;
--skip[-_]log[-_]error)
err_log=;
skip_err_log=1;
;;
--log[-_]error=*)
err_log="$val";
skip_err_log=0;
;;
--port=*) mysql_tcp_port="$val" ;;
--socket=*) mysql_unix_port="$val" ;;
@ -548,6 +556,11 @@ then
fi
fi
if [ $skip_err_log -eq 1 ]
then
append_arg_to_args "--skip-log-error"
fi
if [ -n "$err_log" -o $want_syslog -eq 0 ]
then
if [ -n "$err_log" ]