1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

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)
This commit is contained in:
jimw@mysql.com
2005-01-05 01:08:45 +01:00
parent 9740ca62f9
commit 0ed892f197

View File

@@ -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