summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTerje Rosten <terje.rosten@oracle.com>2017-03-08 08:29:02 +0100
committerTerje Rosten <terje.rosten@oracle.com>2017-03-09 11:40:10 +0100
commitec2a6b6035ed842e39bcecc2c62c39758bda02fb (patch)
treef3f448a6e820a2b877b1e00ec5dbcf9c651c0ba1 /scripts
parentaf84921d263b8bb1d1a06989794db07394f94e21 (diff)
downloadmariadb-git-ec2a6b6035ed842e39bcecc2c62c39758bda02fb.tar.gz
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.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysqld_safe.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index 7116211f8e6..32f489f2a09 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -24,7 +24,9 @@ want_syslog=0
syslog_tag=
user='@MYSQLD_USER@'
pid_file=
+pid_file_append=
err_log=
+err_log_append=
syslog_tag_mysqld=mysqld
syslog_tag_mysqld_safe=mysqld_safe
@@ -582,15 +584,17 @@ then
err_log="$err_log".err
fi
+ err_log_append="$err_log"
case "$err_log" in
/* ) ;;
* ) err_log="$DATADIR/$err_log" ;;
esac
else
err_log=$DATADIR/`@HOSTNAME@`.err
+ err_log_append=`@HOSTNAME@`.err
fi
- append_arg_to_args "--log-error=$err_log"
+ append_arg_to_args "--log-error=$err_log_append"
if [ $want_syslog -eq 1 ]
then
@@ -700,13 +704,15 @@ fi
if test -z "$pid_file"
then
pid_file="$DATADIR/`@HOSTNAME@`.pid"
+ pid_file_append="`@HOSTNAME@`.pid"
else
+ pid_file_append="$pid_file"
case "$pid_file" in
/* ) ;;
* ) pid_file="$DATADIR/$pid_file" ;;
esac
fi
-append_arg_to_args "--pid-file=$pid_file"
+append_arg_to_args "--pid-file=$pid_file_append"
if test -n "$mysql_unix_port"
then