summaryrefslogtreecommitdiff
path: root/scripts/mysqld_safe.sh
diff options
context:
space:
mode:
authorjimw@mysql.com <>2005-01-05 01:08:45 +0100
committerjimw@mysql.com <>2005-01-05 01:08:45 +0100
commit0ed892f1975a380066b4ac7cc38852021344dbbd (patch)
treeb01bb5df26071f559231dabc2c64b8b14dcfd306 /scripts/mysqld_safe.sh
parent9740ca62f94d2d7f527dcb4f3907befd0e2d3f2d (diff)
downloadmariadb-git-0ed892f1975a380066b4ac7cc38852021344dbbd.tar.gz
Change mysqld_safe search for mysqld relative to the current working directory
to only look for the mysqld binary (and english error strings) and assume the datadir from that. Then, if that datadir turns out to not exist, startup will fail. This avoids the behavior where mysqld_safe would go off and run a totally different binary because the data directory had been moved (even when --datadir was specified on the command line). (Bug #7249)
Diffstat (limited to 'scripts/mysqld_safe.sh')
-rw-r--r--scripts/mysqld_safe.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index 270c08679eb..f6b0169d230 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -86,7 +86,7 @@ parse_arguments() {
MY_PWD=`pwd`
# Check if we are starting this relative (for the binary release)
-if test -d $MY_PWD/data/mysql -a -f ./share/mysql/english/errmsg.sys -a \
+if test -f ./share/mysql/english/errmsg.sys -a \
-x ./bin/mysqld
then
MY_BASEDIR_VERSION=$MY_PWD # Where bin, share and data are
@@ -97,7 +97,7 @@ then
defaults="--defaults-extra-file=$MY_BASEDIR_VERSION/data/my.cnf"
fi
# Check if this is a 'moved install directory'
-elif test -f ./var/mysql/db.frm -a -f ./share/mysql/english/errmsg.sys -a \
+elif test -f ./share/mysql/english/errmsg.sys -a \
-x ./libexec/mysqld
then
MY_BASEDIR_VERSION=$MY_PWD # Where libexec, share and var are