diff options
author | unknown <jimw@mysql.com> | 2005-07-19 11:05:49 -0700 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2005-07-19 11:05:49 -0700 |
commit | fd764de3939d40fa752bd45075303b4fe2489d53 (patch) | |
tree | 04692d95c000bd65df72b0a4c5c605b71afa5287 /scripts/mysqld_safe.sh | |
parent | 3b4d10a23d744186be2d91d5301c9f363c34193a (diff) | |
parent | f5631f465adc005d34ea12171cc11a244fd64b7a (diff) | |
download | mariadb-git-fd764de3939d40fa752bd45075303b4fe2489d53.tar.gz |
Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into mysql.com:/home/jimw/my/mysql-5.0-clean
extra/perror.c:
Auto merged
include/my_global.h:
Auto merged
mysql-test/r/ps_1general.result:
Auto merged
mysql-test/r/ps_2myisam.result:
Auto merged
mysql-test/r/ps_3innodb.result:
Auto merged
mysql-test/r/ps_4heap.result:
Auto merged
mysql-test/r/ps_5merge.result:
Auto merged
mysql-test/r/ps_6bdb.result:
Auto merged
mysql-test/r/ps_7ndb.result:
Auto merged
mysql-test/r/select.result:
Auto merged
ndb/src/mgmsrv/ConfigInfo.cpp:
Auto merged
ndb/src/mgmsrv/main.cpp:
Auto merged
sql/des_key_file.cc:
Auto merged
sql/field_conv.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
mysql-test/t/select.test:
Resolve conflicts
scripts/mysqld_safe.sh:
Resolve conflict
sql/item.cc:
Resolve conflict, don't return FIELD_TYPE_BLOB since VARCHAR
can be longer in 5.0 than 4.1.
sql/log_event.cc:
Resolve conflict
sql/mysql_priv.h:
Resolve conflict
sql/mysqld.cc:
Remove incorrect fix (merge from 4.1)
sql/sql_show.cc:
Resolve conflict
Diffstat (limited to 'scripts/mysqld_safe.sh')
-rw-r--r-- | scripts/mysqld_safe.sh | 38 |
1 files changed, 28 insertions, 10 deletions
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index 3a06c4d1fb5..873aff251db 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -106,29 +106,47 @@ parse_arguments() { } +# +# First, try to find BASEDIR and ledir (where mysqld is) +# + MY_PWD=`pwd` -# Check if we are starting this relative (for the binary release) -if test -f ./share/mysql/english/errmsg.sys -a \ - -x ./bin/mysqld +# Check for the directories we would expect from a binary release install +if test -f ./share/mysql/english/errmsg.sys -a -x ./bin/mysqld then MY_BASEDIR_VERSION=$MY_PWD # Where bin, share and data are ledir=$MY_BASEDIR_VERSION/bin # Where mysqld is +# Check for the directories we would expect from a source install +elif test -f ./share/mysql/english/errmsg.sys -a \ + -x ./libexec/mysqld +then + MY_BASEDIR_VERSION=$MY_PWD # Where libexec, share and var are + ledir=$MY_BASEDIR_VERSION/libexec # Where mysqld is +# Since we didn't find anything, used the compiled-in defaults +else + MY_BASEDIR_VERSION=@prefix@ + ledir=@libexecdir@ +fi + +# +# Second, try to find the data directory +# + +# Try where the binary installs put it +if test -d $MY_BASEDIR_VERSION/data/mysql +then DATADIR=$MY_BASEDIR_VERSION/data if test -z "$defaults" -a -r "$DATADIR/my.cnf" then defaults="--defaults-extra-file=$DATADIR/my.cnf" fi -# Check if this is a 'moved install directory' -elif test -f ./share/mysql/english/errmsg.sys -a \ - -x ./libexec/mysqld +# Next try where the source installs put it +elif test -d $MY_BASEDIR_VERSION/var/mysql then - MY_BASEDIR_VERSION=$MY_PWD # Where libexec, share and var are - ledir=$MY_BASEDIR_VERSION/libexec # Where mysqld is DATADIR=$MY_BASEDIR_VERSION/var +# Or just give up and use our compiled-in default else - MY_BASEDIR_VERSION=@prefix@ DATADIR=@localstatedir@ - ledir=@libexecdir@ fi if test -z "$MYSQL_HOME" |