diff options
author | Anel Husakovic <anel@mariadb.org> | 2020-03-05 16:40:29 +0100 |
---|---|---|
committer | Anel Husakovic <anel@mariadb.org> | 2020-05-21 11:51:15 +0200 |
commit | 078c9879f58d388933b476b50a9dbc42c51015b2 (patch) | |
tree | 13852496c361c7757afdab0b6dc3b6cb828b5736 | |
parent | 450a5b33a22efc78dabc0df3f6b7544bddc44662 (diff) | |
download | mariadb-git-bb-10.2-anel-MDEV-21367.tar.gz |
MDEV-21367: mysqld_safe log don't log to err.logbb-10.2-anel-MDEV-21367
Introduced with 6b7918d524d5 in `10.2` just check for helper and handle
it if exist.
-rw-r--r-- | scripts/mysqld_safe.sh | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index 07fa304a4cf..49fd6bbb0e4 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -155,7 +155,7 @@ log_generic () { case $logging in init) ;; # Just echo the message, don't save it anywhere file) - if [ -n "$helper" ]; then + if [ "$helper_exist" -eq "0" ]; then echo "$msg" | "$helper" "$user" log "$err_log" fi ;; @@ -179,7 +179,7 @@ eval_log_error () { local cmd="$1" case $logging in file) - if [ -n "$helper" ]; then + if [ "$helper_exist" -eq "0" ]; then cmd="$cmd 2>&1 | "`shell_quote_string "$helper"`" $user log "`shell_quote_string "$err_log"` fi ;; @@ -567,10 +567,9 @@ fi helper=`find_in_bin mysqld_safe_helper` print_defaults=`find_in_bin my_print_defaults` - # Check if helper exists -$helper --help >/dev/null 2>&1 || helper="" - +command -v $helper --help >/dev/null 2>&1 +helper_exist=$? # # Second, try to find the data directory # @@ -978,7 +977,6 @@ fi # Avoid 'nohup: ignoring input' warning test -n "$NOHUP_NICENESS" && cmd="$cmd < /dev/null" - log_notice "Starting $MYSQLD daemon with databases from $DATADIR" # variable to track the current number of "fast" (a.k.a. subsecond) restarts |