Commit ec2a6b60 authored by Terje Rosten's avatar Terje Rosten

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.
parent af84921d
...@@ -24,7 +24,9 @@ want_syslog=0 ...@@ -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 ...@@ -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 ...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment