summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-01-15 19:13:32 +0100
committerSergei Golubchik <sergii@pisem.net>2013-01-15 19:13:32 +0100
commitd3935adf7a4ea943583e9e51fe8fa8a2c14521dd (patch)
tree4125365a32fa25dde9e79ccfb4dcd10269071607 /scripts
parent85ea99dcaf8fd91fa566a78062dbfa416c2309fe (diff)
parent14ba37f76f87cc48cae62eb6bdf3cda294dff78d (diff)
downloadmariadb-git-d3935adf7a4ea943583e9e51fe8fa8a2c14521dd.tar.gz
mysql-5.5.29 merge
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysqld_safe.sh48
1 files changed, 25 insertions, 23 deletions
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index ce77caadfa8..f49f885bf5a 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -450,29 +450,6 @@ else
DATADIR=@localstatedir@
fi
-#
-# Try to find the plugin directory
-#
-
-# Use user-supplied argument
-if [ -n "${PLUGIN_DIR}" ]; then
- plugin_dir="${PLUGIN_DIR}"
-else
- # Try to find plugin dir relative to basedir
- for dir in lib/mysql/plugin lib/plugin
- do
- if [ -d "${MY_BASEDIR_VERSION}/${dir}" ]; then
- plugin_dir="${MY_BASEDIR_VERSION}/${dir}"
- break
- fi
- done
- # Give up and use compiled-in default
- if [ -z "${plugin_dir}" ]; then
- plugin_dir='@pkgplugindir@'
- fi
-fi
-plugin_dir="${plugin_dir}${PLUGIN_VARIANT}"
-
if test -z "$MYSQL_HOME"
then
if test -r "$MY_BASEDIR_VERSION/my.cnf" && test -r "$DATADIR/my.cnf"
@@ -533,6 +510,31 @@ fi
parse_arguments `$print_defaults $defaults --loose-verbose mysqld_safe safe_mysqld`
parse_arguments PICK-ARGS-FROM-ARGV "$@"
+
+#
+# Try to find the plugin directory
+#
+
+# Use user-supplied argument
+if [ -n "${PLUGIN_DIR}" ]; then
+ plugin_dir="${PLUGIN_DIR}"
+else
+ # Try to find plugin dir relative to basedir
+ for dir in lib/mysql/plugin lib/plugin
+ do
+ if [ -d "${MY_BASEDIR_VERSION}/${dir}" ]; then
+ plugin_dir="${MY_BASEDIR_VERSION}/${dir}"
+ break
+ fi
+ done
+ # Give up and use compiled-in default
+ if [ -z "${plugin_dir}" ]; then
+ plugin_dir='@pkgplugindir@'
+ fi
+fi
+plugin_dir="${plugin_dir}${PLUGIN_VARIANT}"
+
+
# Determine what logging facility to use
# Ensure that 'logger' exists, if it's requested