summaryrefslogtreecommitdiff
path: root/scripts/mysqld_safe.sh
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2021-01-06 10:53:00 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2021-01-06 10:53:00 +0100
commit02e7bff882c5169ba3e1ce7e9a93d4c28fe3afd1 (patch)
tree4a6a8d578fedb4c2b1f437ab39c2d7430ad95163 /scripts/mysqld_safe.sh
parent5f10870c8a8c2448bfc26d990110390d48000b84 (diff)
parent478b83032b170b2ae030fa77fe4bed60a7910472 (diff)
downloadmariadb-git-02e7bff882c5169ba3e1ce7e9a93d4c28fe3afd1.tar.gz
Merge commit '10.4' into 10.5
Diffstat (limited to 'scripts/mysqld_safe.sh')
-rw-r--r--scripts/mysqld_safe.sh10
1 files changed, 4 insertions, 6 deletions
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index 85c9363081c..126eb924814 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -126,7 +126,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
;;
@@ -150,7 +150,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
;;
@@ -533,10 +533,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
#
@@ -943,7 +942,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