BUG#25364806 MYSQLD_SAFE FAILING TO START IF DATADIR GIVEN IS NOT ABSOLUTE PATH
mysqld_safe is working on real files, however passing these file paths as is to mysqld as options gives different meaning when paths are relative. mysqld_safe uses current working directory as basedir for relative paths, while mysqld uses $datadir as basedir.
This commit is contained in:
parent
af84921d26
commit
ec2a6b6035
@ -24,7 +24,9 @@ want_syslog=0
|
|||||||
syslog_tag=
|
syslog_tag=
|
||||||
user='@MYSQLD_USER@'
|
user='@MYSQLD_USER@'
|
||||||
pid_file=
|
pid_file=
|
||||||
|
pid_file_append=
|
||||||
err_log=
|
err_log=
|
||||||
|
err_log_append=
|
||||||
|
|
||||||
syslog_tag_mysqld=mysqld
|
syslog_tag_mysqld=mysqld
|
||||||
syslog_tag_mysqld_safe=mysqld_safe
|
syslog_tag_mysqld_safe=mysqld_safe
|
||||||
@ -582,15 +584,17 @@ then
|
|||||||
err_log="$err_log".err
|
err_log="$err_log".err
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
err_log_append="$err_log"
|
||||||
case "$err_log" in
|
case "$err_log" in
|
||||||
/* ) ;;
|
/* ) ;;
|
||||||
* ) err_log="$DATADIR/$err_log" ;;
|
* ) err_log="$DATADIR/$err_log" ;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
err_log=$DATADIR/`@HOSTNAME@`.err
|
err_log=$DATADIR/`@HOSTNAME@`.err
|
||||||
|
err_log_append=`@HOSTNAME@`.err
|
||||||
fi
|
fi
|
||||||
|
|
||||||
append_arg_to_args "--log-error=$err_log"
|
append_arg_to_args "--log-error=$err_log_append"
|
||||||
|
|
||||||
if [ $want_syslog -eq 1 ]
|
if [ $want_syslog -eq 1 ]
|
||||||
then
|
then
|
||||||
@ -700,13 +704,15 @@ fi
|
|||||||
if test -z "$pid_file"
|
if test -z "$pid_file"
|
||||||
then
|
then
|
||||||
pid_file="$DATADIR/`@HOSTNAME@`.pid"
|
pid_file="$DATADIR/`@HOSTNAME@`.pid"
|
||||||
|
pid_file_append="`@HOSTNAME@`.pid"
|
||||||
else
|
else
|
||||||
|
pid_file_append="$pid_file"
|
||||||
case "$pid_file" in
|
case "$pid_file" in
|
||||||
/* ) ;;
|
/* ) ;;
|
||||||
* ) pid_file="$DATADIR/$pid_file" ;;
|
* ) pid_file="$DATADIR/$pid_file" ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
append_arg_to_args "--pid-file=$pid_file"
|
append_arg_to_args "--pid-file=$pid_file_append"
|
||||||
|
|
||||||
if test -n "$mysql_unix_port"
|
if test -n "$mysql_unix_port"
|
||||||
then
|
then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user