mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 04:22:27 +01:00
Bug #13548161: MYSQLD_SAFE IMPROVEMENTS FOR 5.5 ALLWAYS SETS PLUGIN_DIR
TO DEFAULT IGNOR The test in mysqld_safe for the presence of the --plugin-dir and assigning a default value to it were performed before the actual argument parsing. This is wrong, as PLUGIN_DIR mysqld_safe code also uses MY_BASEDIR_VERSION to look for version specific plugin directory if present. Fixed by moving the PLUGIN_DIR logic after the parse_arguments() call.
This commit is contained in:
parent
9c227f4f92
commit
92d2f60e12
1 changed files with 25 additions and 23 deletions
|
@ -413,29 +413,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"
|
||||
|
@ -496,6 +473,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
|
||||
|
|
Loading…
Reference in a new issue