List:Commits« Previous MessageNext Message »
From:Saikumar V Date:August 1 2011 2:43pm
Subject:bzr commit into mysql-5.5 branch (saikumar.v:3481)
View as plain text  
#At file:///home/saikumar/work/opt-test/mysql-5.5-itch/ based on revid:saikumar.v@stripped

 3481 Saikumar V	2011-08-01
      Changes to test mysql_plugin with the new options --mysqld and ----my_print_defaults, and negative tests for the new options.

    modified:
      mysql-test/r/mysql_plugin.result
      mysql-test/t/mysql_plugin.test
=== modified file 'mysql-test/r/mysql_plugin.result'
--- a/mysql-test/r/mysql_plugin.result	2011-07-28 18:18:07 +0000
+++ b/mysql-test/r/mysql_plugin.result	2011-08-01 14:43:54 +0000
@@ -49,6 +49,14 @@ ERROR: Cannot access basedir at '/basedi
 #
 ERROR: Cannot read plugin config file daemon_example. File does not exist.
 # 
+# Attempt to use bad paths - mysqld
+#
+ERROR: Cannot access mysqld path '/mysqld_not_there/'.
+# 
+# Attempt to use bad paths - my_print_defaults
+#
+ERROR: Cannot access my-print-defaults path '/my_print_defaults_not_there/'.
+# 
 # Missing library
 #
 ERROR: The plugin library is missing or in a different location.

=== modified file 'mysql-test/t/mysql_plugin.test'
--- a/mysql-test/t/mysql_plugin.test	2011-07-29 09:17:44 +0000
+++ b/mysql-test/t/mysql_plugin.test	2011-08-01 14:43:54 +0000
@@ -8,14 +8,12 @@
 let $MYSQLD_DATADIR= `select @@datadir`;
 let $MYSQL_BASEDIR= `select @@basedir`;
 
-# The mysql_plugin tool expects all executables in "basedir", so they will be copied to it.
-# It also expects a directory structure like in the installed mysql version, so errmsg.sys
-# will be copied to "basedir/share". 
 --disable_abort_on_error
 
 # The mysql_plugin tool now accepts --mysqld the path to mysqld server,
 # the mysqld path is extracted from MYSQLD_BOOTSTRAP_CMD line.
-# The directories differ between Windows and Unix.
+# The directories differ between Windows and Unix but the below perl script
+# will pick as per platform the mysqld path.
 perl;
   my ($mysqld)= split " ", $ENV{MYSQLD_BOOTSTRAP_CMD};
   open(FILE, ">", "$ENV{MYSQL_TMP_DIR}/mysqld.inc") or die;
@@ -26,11 +24,17 @@ EOF
 source $MYSQL_TMP_DIR/mysqld.inc;
 remove_file $MYSQL_TMP_DIR/mysqld.inc;
 
+# The mysql_plugin tool expects a directory structure like in the installed mysql version, so errmsg.sys
+# will be copied to "basedir/share", we create and remove this structure. 
+
 let $MYSQLD_BASEDIR= $MYSQL_BASEDIR/bin;
 --mkdir $MYSQLD_BASEDIR/share
 --copy_file $MYSQL_BASEDIR/share/english/errmsg.sys $MYSQLD_BASEDIR/share/errmsg.sys
 
-let $MYSQLD_BOOTSTRAP_CMD= $MYSQL_PLUGIN --datadir=$MYSQLD_DATADIR --basedir=$MYSQLD_BASEDIR --plugin-dir=$DAEMONEXAMPLE_DIR --mysqld=$MYSQLD --my_print_defaults=$MYSQL_MY_PRINT_DEFAULTS;
+# The mysql_plugin tool now accepts --my_print_defaults which points to the executable my_print_defaults.exe
+# we can get this path from the variable $MYSQL_MY_PRINT_DEFAULTS.
+
+let $MYSQLD_BOOTSTRAP_CMD= $MYSQL_PLUGIN --datadir=$MYSQLD_DATADIR --basedir=$MYSQL_BASEDIR --plugin-dir=$DAEMONEXAMPLE_DIR --mysqld=$MYSQLD --my_print_defaults=$MYSQL_MY_PRINT_DEFAULTS;
 
 --echo #
 --echo # Ensure the plugin isn't loaded.
@@ -145,7 +149,7 @@ EOF
 --echo # 
 --echo # Attempt to use bad paths - datadir
 --echo #
-let $MYSQLD_BOOTSTRAP_CMD= $MYSQL_PLUGIN -n --datadir=/data_not_there/ --basedir=$MYSQLD_BASEDIR --plugin-dir=$DAEMONEXAMPLE_DIR --mysqld=$MYSQLD --my_print_defaults=$MYSQL_MY_PRINT_DEFAULTS;
+let $MYSQLD_BOOTSTRAP_CMD= $MYSQL_PLUGIN -n --datadir=/data_not_there/ --basedir=$MYSQL_BASEDIR --plugin-dir=$DAEMONEXAMPLE_DIR --mysqld=$MYSQLD --my_print_defaults=$MYSQL_MY_PRINT_DEFAULTS;
 --error 1,2,256
 --exec $MYSQLD_BOOTSTRAP_CMD DISABLE daemon_example 2>&1
 
@@ -159,21 +163,36 @@ let $MYSQLD_BOOTSTRAP_CMD= $MYSQL_PLUGIN
 --echo # 
 --echo # Attempt to use bad paths - plugin_dir
 --echo #
-let $MYSQLD_BOOTSTRAP_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=$MYSQLD_BASEDIR --plugin-dir=/plugin_not_there/ --mysqld=$MYSQLD --my_print_defaults=$MYSQL_MY_PRINT_DEFAULTS;
+let $MYSQLD_BOOTSTRAP_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=$MYSQL_BASEDIR --plugin-dir=/plugin_not_there/ --mysqld=$MYSQLD --my_print_defaults=$MYSQL_MY_PRINT_DEFAULTS;
+--error 1,2,256
+--exec $MYSQLD_BOOTSTRAP_CMD DISABLE daemon_example 2>&1
+
+--echo # 
+--echo # Attempt to use bad paths - mysqld
+--echo #
+let $MYSQLD_BOOTSTRAP_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=$MYSQL_BASEDIR --plugin-dir=$DAEMONEXAMPLE_DIR --mysqld=/mysqld_not_there/ --my_print_defaults=$MYSQL_MY_PRINT_DEFAULTS;
 --error 1,2,256
 --exec $MYSQLD_BOOTSTRAP_CMD DISABLE daemon_example 2>&1
 
 --echo # 
+--echo # Attempt to use bad paths - my_print_defaults
+--echo #
+let $MYSQLD_BOOTSTRAP_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=$MYSQL_BASEDIR --plugin-dir=$DAEMONEXAMPLE_DIR --mysqld=$MYSQLD --my_print_defaults=/my_print_defaults_not_there/;
+--error 1,2,256
+--exec $MYSQLD_BOOTSTRAP_CMD DISABLE daemon_example 2>&1
+
+
+--echo # 
 --echo # Missing library
 --echo #
-let $MYSQLD_BOOTSTRAP_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=$MYSQLD_BASEDIR --plugin-dir=$DAEMONEXAMPLE_DIR --plugin-ini=$MYSQL_TEST_DIR/include/daemon_example_bad_soname.ini --mysqld=$MYSQLD --my_print_defaults=$MYSQL_MY_PRINT_DEFAULTS;
+let $MYSQLD_BOOTSTRAP_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=$MYSQL_BASEDIR --plugin-dir=$DAEMONEXAMPLE_DIR --plugin-ini=$MYSQL_TEST_DIR/include/daemon_example_bad_soname.ini --mysqld=$MYSQLD --my_print_defaults=$MYSQL_MY_PRINT_DEFAULTS;
 --error 1,2,256
 --exec $MYSQLD_BOOTSTRAP_CMD DISABLE daemon_example 2>&1
 
 --echo # 
 --echo # Bad format for config file
 --echo #
-let $MYSQLD_BOOTSTRAP_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=$MYSQLD_BASEDIR --plugin-dir=$DAEMONEXAMPLE_DIR --plugin-ini=$MYSQL_TEST_DIR/include/daemon_example_bad_format.ini --mysqld=$MYSQLD --my_print_defaults=$MYSQL_MY_PRINT_DEFAULTS;
+let $MYSQLD_BOOTSTRAP_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=$MYSQL_BASEDIR --plugin-dir=$DAEMONEXAMPLE_DIR --plugin-ini=$MYSQL_TEST_DIR/include/daemon_example_bad_format.ini --mysqld=$MYSQLD --my_print_defaults=$MYSQL_MY_PRINT_DEFAULTS;
 --error 1,2,256
 --exec $MYSQLD_BOOTSTRAP_CMD DISABLE daemon_example 2>&1
 
@@ -187,14 +206,14 @@ let $MYSQLD_BOOTSTRAP_CMD= $MYSQL_PLUGIN
 --echo # 
 --echo # Missing data_dir option
 --echo #
-let $MYSQLD_BOOTSTRAP_CMD= $MYSQL_PLUGIN -n --basedir=$MYSQLD_BASEDIR --plugin-dir=$DAEMONEXAMPLE_DIR --mysqld=$MYSQLD --my_print_defaults=$MYSQL_MY_PRINT_DEFAULTS;
+let $MYSQLD_BOOTSTRAP_CMD= $MYSQL_PLUGIN -n --basedir=$MYSQL_BASEDIR --plugin-dir=$DAEMONEXAMPLE_DIR --mysqld=$MYSQLD --my_print_defaults=$MYSQL_MY_PRINT_DEFAULTS;
 --error 1,2,139,256
 --exec $MYSQLD_BOOTSTRAP_CMD DISABLE daemon_example 2>&1
 
 --echo # 
 --echo # Missing plugin_dir option
 --echo #
-let $MYSQLD_BOOTSTRAP_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=$MYSQLD_BASEDIR --mysqld=$MYSQLD --my_print_defaults=$MYSQL_MY_PRINT_DEFAULTS;
+let $MYSQLD_BOOTSTRAP_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQL_DATADIR --basedir=$MYSQL_BASEDIR --mysqld=$MYSQLD --my_print_defaults=$MYSQL_MY_PRINT_DEFAULTS;
 --error 1,2,139,256
 --exec $MYSQLD_BOOTSTRAP_CMD DISABLE daemon_example 2>&1
 
@@ -224,6 +243,7 @@ EOF
 --error 0,1
 --remove_file $expect_file
 
+# Cleanup the share folder in the binary path.
 --remove_file $MYSQLD_BASEDIR/share/errmsg.sys
 --rmdir $MYSQLD_BASEDIR/share
 


Attachment: [text/bzr-bundle] bzr/saikumar.v@oracle.com-20110801144354-0b9gbryvmqi8fayw.bundle
Thread
bzr commit into mysql-5.5 branch (saikumar.v:3481) Saikumar V3 Aug