mysqld_safe.sh from https://github.com/MariaDB/server/blob/10.5/scripts/mysqld_safe.sh
As the following code in mysqld_safe, the helper would always be "". As a result, we could not record the mysqld_safe log into error log.
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=""
|
"$helper --help >/dev/null 2>&1" would always be 0 in mariadb, so the helper would always be "";
log_generic () {
|
[ $dry_run -eq 1 ] && return
|
priority="$1"
|
shift
|
|
msg="`date +'%y%m%d %H:%M:%S'` mysqld_safe $*"
|
echo "$msg"
|
case $logging in
|
init) ;; # Just echo the message, don't save it anywhere
|
file)
|
if [ -n "$helper" ]; then ### would always be FALSE, don't log into err.log
|
echo "$msg" | "$helper" "$user" log "$err_log"
|
fi
|
;;
|
syslog) logger -t "$syslog_tag_mysqld_safe" -p "$priority" "$*" ;;
|
*)
|
echo "Internal program error (non-fatal):" \
|
" unknown logging method '$logging'" >&2
|
;;
|
esac
|
}
|