List:Commits« Previous MessageNext Message »
From:Jonathan Perkin Date:July 5 2010 10:49pm
Subject:bzr push into mysql-trunk branch (jonathan.perkin:3098 to 3099)
View as plain text  
 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
 3098 Jonathan Perkin	2010-07-05
      I'm pretty sure 'CXX_FLAGS' is a typo for 'CMAKE_CXX_FLAGS', and
      this is the reason why -fno-implicit-templates is removed from the
      entire build when sourcing this file, rather than just limited to
      yassl sources.

    modified:
      cmake/ssl.cmake
=== 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 push into mysql-trunk branch (jonathan.perkin:3098 to 3099) Jonathan Perkin6 Jul