diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2015-06-30 18:01:40 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2015-07-16 14:03:29 +0400 |
commit | 94bc50650eb490e8d844acfc700f75992857509a (patch) | |
tree | 9d28c61017c65d8fa7b975b2d3fbd52b37677c2f /scripts | |
parent | 6efdc398bae24483dc7eff73f92142fd968b8a7d (diff) | |
download | mariadb-git-94bc50650eb490e8d844acfc700f75992857509a.tar.gz |
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.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mysqld_safe.sh | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index fdb4464a98f..49a2b0ed8ed 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -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" ] |