mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into dl145b.mysql.com:/home/ndbdev/tomas/mysql-5.1 extra/perror.c: Auto merged include/my_global.h: Auto merged mysql-test/r/ps_6bdb.result: Auto merged mysql-test/r/ps_7ndb.result: Auto merged BitKeeper/deleted/.del-var~62c955ccf2da1a21: Auto merged mysql-test/t/disabled.def: Auto merged sql/field.cc: Auto merged sql/ha_ndbcluster.cc: Auto merged sql/item.cc: Auto merged sql/log_event.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_prepare.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_show.cc: Auto merged storage/ndb/src/mgmsrv/ConfigInfo.cpp: Auto merged storage/ndb/src/mgmsrv/ConfigInfo.hpp: Auto merged storage/ndb/src/mgmsrv/main.cpp: Auto merged
This commit is contained in:
@ -106,31 +106,49 @@ 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
|
||||
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'
|
||||
# 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
|
||||
DATADIR=$MY_BASEDIR_VERSION/var
|
||||
# Since we didn't find anything, used the compiled-in defaults
|
||||
else
|
||||
MY_BASEDIR_VERSION=@prefix@
|
||||
DATADIR=@localstatedir@
|
||||
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
|
||||
# Next try where the source installs put it
|
||||
elif test -d $MY_BASEDIR_VERSION/var/mysql
|
||||
then
|
||||
DATADIR=$MY_BASEDIR_VERSION/var
|
||||
# Or just give up and use our compiled-in default
|
||||
else
|
||||
DATADIR=@localstatedir@
|
||||
fi
|
||||
|
||||
if test -z "$MYSQL_HOME"
|
||||
then
|
||||
if test -r "$MY_BASEDIR_VERSION/my.cnf" && test -r "$DATADIR/my.cnf"
|
||||
|
Reference in New Issue
Block a user