mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03: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:
@@ -413,29 +413,6 @@ else
|
|||||||
DATADIR=@localstatedir@
|
DATADIR=@localstatedir@
|
||||||
fi
|
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"
|
if test -z "$MYSQL_HOME"
|
||||||
then
|
then
|
||||||
if test -r "$MY_BASEDIR_VERSION/my.cnf" && test -r "$DATADIR/my.cnf"
|
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 `$print_defaults $defaults --loose-verbose mysqld_safe safe_mysqld`
|
||||||
parse_arguments PICK-ARGS-FROM-ARGV "$@"
|
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
|
# Determine what logging facility to use
|
||||||
|
|
||||||
# Ensure that 'logger' exists, if it's requested
|
# Ensure that 'logger' exists, if it's requested
|
||||||
|
Reference in New Issue
Block a user