Commit 94bc5065 authored by Sergey Vojtovich's avatar Sergey Vojtovich

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.
parent 6efdc398
[mysqld_safe] [mysqld_safe]
skip_log_error
syslog syslog
...@@ -29,6 +29,7 @@ user='@MYSQLD_USER@' ...@@ -29,6 +29,7 @@ user='@MYSQLD_USER@'
pid_file= pid_file=
err_log= err_log=
err_log_base= err_log_base=
skip_err_log=0
syslog_tag_mysqld=mysqld syslog_tag_mysqld=mysqld
syslog_tag_mysqld_safe=mysqld_safe syslog_tag_mysqld_safe=mysqld_safe
...@@ -208,7 +209,14 @@ parse_arguments() { ...@@ -208,7 +209,14 @@ parse_arguments() {
# these might have been set in a [mysqld_safe] section of my.cnf # 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 # 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" ;; --port=*) mysql_tcp_port="$val" ;;
--socket=*) mysql_unix_port="$val" ;; --socket=*) mysql_unix_port="$val" ;;
...@@ -548,6 +556,11 @@ then ...@@ -548,6 +556,11 @@ then
fi fi
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 ] if [ -n "$err_log" -o $want_syslog -eq 0 ]
then then
if [ -n "$err_log" ] if [ -n "$err_log" ]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment