List:Commits« Previous MessageNext Message »
From:Chuck Bell Date:August 10 2011 6:36pm
Subject:bzr push into mysql-5.5 branch (chuck.bell:3479 to 3480) WL#5710
View as plain text  
 3480 Chuck Bell	2011-08-09
      WL#5710 : enable and disable plugins
      
      This patch corrects an error in the test to ensure the proper path
      is used for the --mysqld option.

    modified:
      mysql-test/t/mysql_plugin.test
 3479 Chuck Bell	2011-08-09
      WL#5710 : enable and disable plugins
      
      This patch corrects a problem found in PB. Some platforms have very
      different locations for the mysql installation. The client was not
      able to find either my_print_defaults or mysqld predictably.
      
      The patch adds two new command options --mysqld and --my-print-defaults
      which can be used to provide the location of mysqld and
      my_print_defaults by providing the paths.
      
      The patch also changes the concatenation of the soname extension to
      fix a problem found on some Ubuntu systems.
      
      The patch contains changes to the test to ensure it will run on all
      platforms. A trap is set in the test to skip testing if the location
      of mysqld, my_print_defaults, or the daemon_example.ini files cannot
      be determined.

    modified:
      client/mysql_plugin.c
      mysql-test/r/mysql_plugin.result
      mysql-test/t/mysql_plugin.test
=== modified file 'mysql-test/t/mysql_plugin.test'
--- a/mysql-test/t/mysql_plugin.test	2011-08-09 12:58:18 +0000
+++ b/mysql-test/t/mysql_plugin.test	2011-08-09 19:09:28 +0000
@@ -101,7 +101,7 @@ if ($PLUGIN_DIR == '')
 
 # Build client command for reuse.
 
-let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN --datadir=$MYSQLD_DATADIR --basedir=$MYSQLD_BASEDIR --plugin-dir=$PLUGIN_DIR --mysqld=$MYSQLD --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
+let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN --datadir=$MYSQLD_DATADIR --basedir=$MYSQLD_BASEDIR --plugin-dir=$PLUGIN_DIR --mysqld=$MYSQLD_BASEDIR --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
 
 --echo #
 --echo # Ensure the plugin isn't loaded.
@@ -216,21 +216,21 @@ EOF
 --echo # 
 --echo # Attempt to use bad paths - datadir
 --echo #
-let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=/data_not_there/ --basedir=$MYSQL_BASEDIR --plugin-dir=$PLUGIN_DIR --mysqld=$MYSQLD --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
+let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=/data_not_there/ --basedir=$MYSQL_BASEDIR --plugin-dir=$PLUGIN_DIR --mysqld=$MYSQLD_BASEDIR --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
 --error 1,2,256
 --exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
 
 --echo # 
 --echo # Attempt to use bad paths - basedir
 --echo #
-let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=/basedir_not_there/ --plugin-dir=$PLUGIN_DIR --mysqld=$MYSQLD --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
+let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=/basedir_not_there/ --plugin-dir=$PLUGIN_DIR --mysqld=$MYSQLD_BASEDIR --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
 --error 1,2,256
 --exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
 
 --echo # 
 --echo # Attempt to use bad paths - plugin_dir
 --echo #
-let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=$MYSQL_BASEDIR --plugin-dir=/plugin_not_there/ --mysqld=$MYSQLD --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
+let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=$MYSQL_BASEDIR --plugin-dir=/plugin_not_there/ --mysqld=$MYSQLD_BASEDIR --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
 --error 1,2,256
 --exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
 
@@ -244,7 +244,7 @@ let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n
 --echo # 
 --echo # Attempt to use bad paths - my_print_defaults
 --echo #
-let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=$MYSQL_BASEDIR --plugin-dir=$PLUGIN_DIR --mysqld=$MYSQLD --my-print-defaults=/my_print_defaults_not_there/;
+let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=$MYSQL_BASEDIR --plugin-dir=$PLUGIN_DIR --mysqld=$MYSQLD_BASEDIR --my-print-defaults=/my_print_defaults_not_there/;
 --error 1,2,256
 --exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
 
@@ -252,35 +252,35 @@ let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n
 --echo # 
 --echo # Missing library
 --echo #
-let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=$MYSQL_BASEDIR --plugin-dir=$PLUGIN_DIR --plugin-ini=$MYSQL_TEST_DIR/include/daemon_example_bad_soname.ini --mysqld=$MYSQLD --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
+let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=$MYSQL_BASEDIR --plugin-dir=$PLUGIN_DIR --plugin-ini=$MYSQL_TEST_DIR/include/daemon_example_bad_soname.ini --mysqld=$MYSQLD_BASEDIR --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
 --error 1,2,256
 --exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
 
 --echo # 
 --echo # Bad format for config file
 --echo #
-let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=$MYSQL_BASEDIR --plugin-dir=$PLUGIN_DIR --plugin-ini=$MYSQL_TEST_DIR/include/daemon_example_bad_format.ini --mysqld=$MYSQLD --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
+let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=$MYSQL_BASEDIR --plugin-dir=$PLUGIN_DIR --plugin-ini=$MYSQL_TEST_DIR/include/daemon_example_bad_format.ini --mysqld=$MYSQLD_BASEDIR --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
 --error 1,2,256
 --exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
 
 --echo # 
 --echo # Missing base_dir option
 --echo #
-let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --plugin-dir=$PLUGIN_DIR --mysqld=$MYSQLD --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
+let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --plugin-dir=$PLUGIN_DIR --mysqld=$MYSQLD_BASEDIR --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
 --error 1,2,139,256
 --exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
 
 --echo # 
 --echo # Missing data_dir option
 --echo #
-let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --basedir=$MYSQL_BASEDIR --plugin-dir=$PLUGIN_DIR --mysqld=$MYSQLD --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
+let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --basedir=$MYSQL_BASEDIR --plugin-dir=$PLUGIN_DIR --mysqld=$MYSQLD_BASEDIR --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
 --error 1,2,139,256
 --exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
 
 --echo # 
 --echo # Missing plugin_dir option
 --echo #
-let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQL_DATADIR --basedir=$MYSQL_BASEDIR --mysqld=$MYSQLD --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
+let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQL_DATADIR --basedir=$MYSQL_BASEDIR --mysqld=$MYSQLD_BASEDIR --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
 --error 1,2,139,256
 --exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
 

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5 branch (chuck.bell:3479 to 3480) WL#5710Chuck Bell11 Aug