#At file:///Users/jonathan/bzr2/mysql-5.5.5-m3-release/ based on revid:jonathan.perkin@stripped
3099 Jonathan Perkin 2010-07-05
We can't rely on mysql_config for core functionality like plugins
as it may be part of a separate package.
Work out the likliest plugin directory using similar logic to the
data directory, and avoid the dependancy.
modified:
scripts/mysqld_safe.sh
=== modified file 'scripts/mysqld_safe.sh'
--- a/scripts/mysqld_safe.sh 2010-06-30 11:19:54 +0000
+++ b/scripts/mysqld_safe.sh 2010-07-05 21:19:14 +0000
@@ -413,6 +413,29 @@ 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"
@@ -704,8 +727,6 @@ fi
cmd="`mysqld_ld_preload_text`$NOHUP_NICENESS"
-plugin_dir="${PLUGIN_DIR:-`get_mysql_config --variable=plugindir`}${PLUGIN_VARIANT}"
-
for i in "$ledir/$MYSQLD" "$defaults" "--basedir=$MY_BASEDIR_VERSION" \
"--datadir=$DATADIR" "--plugin-dir=$plugin_dir" "$USER_OPTION"
do
Attachment: [text/bzr-bundle] bzr/jonathan.perkin@oracle.com-20100705211914-3rv94ey0n8xf1g5q.bundle
| Thread |
|---|
| • bzr commit into mysql-trunk branch (jonathan.perkin:3099) | Jonathan Perkin | 5 Jul |