summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChad MILLER <chad@mysql.com>2009-03-16 14:54:28 -0400
committerChad MILLER <chad@mysql.com>2009-03-16 14:54:28 -0400
commitc924f116f65d96818be88dae79018a83e19411b5 (patch)
treea67f0c052151bb66d29428aaff10609b84cb6629 /scripts
parent60beb4c3da759bd716ac7c49ee4103ca31abcf93 (diff)
downloadmariadb-git-c924f116f65d96818be88dae79018a83e19411b5.tar.gz
Bug#39326: mysqld_safe doesn't use --basedir value in search of \
my_print_defaults Now use basedir to set an unset ledir and to find the location of my_print_defaults .
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysqld_safe.sh28
1 files changed, 21 insertions, 7 deletions
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index 5e7a177a546..502c981c72a 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -212,15 +212,26 @@ fi
MY_PWD=`pwd`
# Check for the directories we would expect from a binary release install
-if test -f "$relpkgdata"/english/errmsg.sys -a -x ./bin/mysqld
+if test -n "$MY_BASEDIR_VERSION" -a -d "$MY_BASEDIR_VERSION"
then
- MY_BASEDIR_VERSION=$MY_PWD # Where bin, share and data are
- ledir=$MY_BASEDIR_VERSION/bin # Where mysqld is
+ # BASEDIR is already overridden on command line. Do not re-set.
+
+ # Use BASEDIR to discover le.
+ if test -x "$MY_BASEDIR_VERSION/libexec/mysqld"
+ then
+ ledir="$MY_BASEDIR_VERSION/libexec"
+ else
+ ledir="$MY_BASEDIR_VERSION/bin"
+ fi
+elif test -f "$relpkgdata"/english/errmsg.sys -a -x "$MY_PWD/bin/mysqld"
+then
+ MY_BASEDIR_VERSION="$MY_PWD" # Where bin, share and data are
+ ledir="$MY_PWD/bin" # Where mysqld is
# Check for the directories we would expect from a source install
-elif test -f "$relpkgdata"/english/errmsg.sys -a -x ./libexec/mysqld
+elif test -f "$relpkgdata"/english/errmsg.sys -a -x "$MY_PWD/libexec/mysqld"
then
- MY_BASEDIR_VERSION=$MY_PWD # Where libexec, share and var are
- ledir=$MY_BASEDIR_VERSION/libexec # Where mysqld is
+ MY_BASEDIR_VERSION="$MY_PWD" # Where libexec, share and var are
+ ledir="$MY_PWD/libexec" # Where mysqld is
# Since we didn't find anything, used the compiled-in defaults
else
MY_BASEDIR_VERSION=@prefix@
@@ -274,7 +285,10 @@ export MYSQL_HOME
# Get first arguments from the my.cnf file, groups [mysqld] and [mysqld_safe]
# and then merge with the command line arguments
-if test -x ./bin/my_print_defaults
+if test -x "$MY_BASEDIR_VERSION/bin/my_print_defaults"
+then
+ print_defaults="$MY_BASEDIR_VERSION/bin/my_print_defaults"
+elif test -x ./bin/my_print_defaults
then
print_defaults="./bin/my_print_defaults"
elif test -x @bindir@/my_print_defaults