List:Commits« Previous MessageNext Message »
From:Mats Kindahl Date:March 1 2010 10:40pm
Subject:bzr commit into mysql-next-mr branch (mats:3006) Bug#49022
View as plain text  
#At file:///home/bzr/bugs/b49022-next-mr/ based on revid:bar@stripped

 3006 Mats Kindahl	2010-03-01
      Bug #49022: Plugins included into bin release cannot be
                  installed on debug version of server
      
      When starting a server using mysqld_safe with the option
      --mysqld-version=debug, the debug version of the server
      is started. When attempting to load a plugin that is not
      debug-built, the load will fail because a non-debug built
      plugin use, e.g., fastmutex while the debug-built server
      uses safemutex.
      
      To solve this problem, mysqld_safe will set the plugin-dir
      to use a directory where debug-built plugins are placed.
      
      This patch sets the plugin dir to <plugin-dir>/whatever,
      when mysqld-version=whatever, and just <plugin-dir> otherwise.

    modified:
      scripts/mysqld_safe.sh
=== modified file 'scripts/mysqld_safe.sh'
--- a/scripts/mysqld_safe.sh	2010-01-24 15:23:16 +0000
+++ b/scripts/mysqld_safe.sh	2010-03-01 22:40:24 +0000
@@ -54,6 +54,8 @@ Usage: $0 [OPTIONS]
   --mysqld=FILE              Use the specified file as mysqld
   --mysqld-version=VERSION   Use "mysqld-VERSION" as mysqld
   --nice=NICE                Set the scheduling priority of mysqld
+  --plugin-dir=DIR           Plugins are under DIR or DIR/VERSION, if
+                             VERSION is given
   --skip-kill-mysqld         Don't try to kill stray mysqld processes
   --syslog                   Log messages to syslog with 'logger'
   --skip-syslog              Log messages to error log (default)
@@ -172,6 +174,7 @@ parse_arguments() {
       --basedir=*) MY_BASEDIR_VERSION="$val" ;;
       --datadir=*) DATADIR="$val" ;;
       --pid-file=*) pid_file="$val" ;;
+      --plugin-dir=*) PLUGIN_DIR="$val" ;;
       --user=*) user="$val"; SET_USER=1 ;;
 
       # these might have been set in a [mysqld_safe] section of my.cnf
@@ -189,6 +192,7 @@ parse_arguments() {
         if test -n "$val"
         then
           MYSQLD="mysqld-$val"
+          PLUGIN_VARIANT="/$val"
         else
           MYSQLD="mysqld"
         fi
@@ -695,8 +699,10 @@ fi
 
 cmd="`mysqld_ld_preload_text`$NOHUP_NICENESS"
 
+plugin_dir="${PLUGIN_DIR:-@PLUGINDIR@}${PLUGIN_VARIANT}"
+
 for i in  "$ledir/$MYSQLD" "$defaults" "--basedir=$MY_BASEDIR_VERSION" \
-  "--datadir=$DATADIR" "$USER_OPTION"
+  "--datadir=$DATADIR" "--plugin-dir=$plugin_dir" "$USER_OPTION"
 do
   cmd="$cmd "`shell_quote_string "$i"`
 done


Attachment: [text/bzr-bundle] bzr/mats@sun.com-20100301224024-tt6ayebcqwmd532n.bundle
Thread
bzr commit into mysql-next-mr branch (mats:3006) Bug#49022Mats Kindahl1 Mar