diff options
author | unknown <jimw@mysql.com> | 2005-01-05 01:08:45 +0100 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2005-01-05 01:08:45 +0100 |
commit | 284780167d6ad8bcefb087c7c989fdd99992f053 (patch) | |
tree | b01bb5df26071f559231dabc2c64b8b14dcfd306 /scripts/mysqld_safe.sh | |
parent | 55ace5fd44953f7751452fd4c2e9ed79a4bace44 (diff) | |
download | mariadb-git-284780167d6ad8bcefb087c7c989fdd99992f053.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)
scripts/mysqld_safe.sh:
Don't actually verify that datadir exists when
using relatively-located mysqld -- just assume
that it does and either let it fail when it
doesn't, or do the right thing when datadir
is then set via the command line or my.cnf file.
Diffstat (limited to 'scripts/mysqld_safe.sh')
-rw-r--r-- | scripts/mysqld_safe.sh | 4 |
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 |