List:Commits« Previous MessageNext Message »
From:Saikumar V Date:July 29 2011 9:17am
Subject:bzr commit into mysql-5.5 branch (saikumar.v:3480)
View as plain text  
#At file:///home/saikumar/work/opt-test/mysql-5.5-itch/ based on revid:chuck.bell@stripped

 3480 Saikumar V	2011-07-29
      Changes to test mysql_plugin with the new options --mysqld and ----my_print_defaults

    modified:
      mysql-test/t/mysql_plugin.test
=== modified file 'mysql-test/t/mysql_plugin.test'
--- a/mysql-test/t/mysql_plugin.test	2011-07-28 18:18:07 +0000
+++ b/mysql-test/t/mysql_plugin.test	2011-07-29 09:17:44 +0000
@@ -10,26 +10,27 @@ 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". The directories differ between Windows and Unix.
+# will be copied to "basedir/share". 
 --disable_abort_on_error
-if(`SELECT CONVERT(@@version_compile_os USING latin1)
-    IN ('Win32','Win64','Windows')`)
-{
-   let $MYSQLD_BASEDIR= $MYSQL_BASEDIR/sql/Debug;
-   --copy_file $MYSQL_BASEDIR/extra/Debug/my_print_defaults.exe $MYSQLD_BASEDIR/my_print_defaults.exe
-   --mkdir $MYSQLD_BASEDIR/share
-   --copy_file $MYSQL_BASEDIR/sql/share/english/errmsg.sys $MYSQLD_BASEDIR/share/errmsg.sys
-   --copy_file $MYSQL_BASEDIR/plugin/daemon_example/daemon_example.ini $DAEMONEXAMPLE_DIR/daemon_example.ini
-}
-if (`SELECT CONVERT(@@version_compile_os USING latin1)
-    NOT IN ('Win32','Win64','Windows')`)
-{
-   let $MYSQLD_BASEDIR= $MYSQL_BASEDIR/sql;
-   --copy_file $MYSQL_BASEDIR/extra/my_print_defaults $MYSQLD_BASEDIR/my_print_defaults
-   --copy_file $MYSQL_BASEDIR/sql/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=$MYSQL_BOOTSTRAP --my-print-defaults=$MY_PRINT_DEFAULTS;
+# 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.
+perl;
+  my ($mysqld)= split " ", $ENV{MYSQLD_BOOTSTRAP_CMD};
+  open(FILE, ">", "$ENV{MYSQL_TMP_DIR}/mysqld.inc") or die;
+  print FILE "let \$MYSQLD= $mysqld;\n";
+  close FILE;
+EOF
+
+source $MYSQL_TMP_DIR/mysqld.inc;
+remove_file $MYSQL_TMP_DIR/mysqld.inc;
+
+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;
 
 --echo #
 --echo # Ensure the plugin isn't loaded.
@@ -144,56 +145,56 @@ 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;
+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;
 --error 1,2,256
 --exec $MYSQLD_BOOTSTRAP_CMD DISABLE daemon_example 2>&1
 
 --echo # 
 --echo # Attempt to use bad paths - basedir
 --echo #
-let $MYSQLD_BOOTSTRAP_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=/basedir_not_there/ --plugin-dir=$DAEMONEXAMPLE_DIR;
+let $MYSQLD_BOOTSTRAP_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=/basedir_not_there/ --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
 
 --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/;
+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;
 --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;
+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;
 --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;
+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;
 --error 1,2,256
 --exec $MYSQLD_BOOTSTRAP_CMD DISABLE daemon_example 2>&1
 
 --echo # 
 --echo # Missing base_dir option
 --echo #
-let $MYSQLD_BOOTSTRAP_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --plugin-dir=$DAEMONEXAMPLE_DIR;
+let $MYSQLD_BOOTSTRAP_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --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 data_dir option
 --echo #
-let $MYSQLD_BOOTSTRAP_CMD= $MYSQL_PLUGIN -n --basedir=$MYSQLD_BASEDIR --plugin-dir=$DAEMONEXAMPLE_DIR;
+let $MYSQLD_BOOTSTRAP_CMD= $MYSQL_PLUGIN -n --basedir=$MYSQLD_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;
+let $MYSQLD_BOOTSTRAP_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=$MYSQLD_BASEDIR --mysqld=$MYSQLD --my_print_defaults=$MYSQL_MY_PRINT_DEFAULTS;
 --error 1,2,139,256
 --exec $MYSQLD_BOOTSTRAP_CMD DISABLE daemon_example 2>&1
 
@@ -223,18 +224,7 @@ EOF
 --error 0,1
 --remove_file $expect_file
 
-if(`SELECT CONVERT(@@version_compile_os USING latin1)
-    IN ('Win32','Win64','Windows')`)
-{
-  --remove_file $DAEMONEXAMPLE_DIR/daemon_example.ini
-  --remove_file $MYSQLD_BASEDIR/my_print_defaults.exe
-  --remove_file $MYSQLD_BASEDIR/share/errmsg.sys
-  --rmdir $MYSQLD_BASEDIR/share
-}
-if(`SELECT CONVERT(@@version_compile_os USING latin1)
-    NOT IN ('Win32','Win64','Windows')`)
-{
-  --remove_file $MYSQLD_BASEDIR/my_print_defaults
-  --remove_file $MYSQLD_BASEDIR/share/errmsg.sys
-}
+--remove_file $MYSQLD_BASEDIR/share/errmsg.sys
+--rmdir $MYSQLD_BASEDIR/share
+
 --enable_abort_on_error


Attachment: [text/bzr-bundle] bzr/saikumar.v@oracle.com-20110729091744-3zfulo1vmvqukwum.bundle
Thread
bzr commit into mysql-5.5 branch (saikumar.v:3480) Saikumar V3 Aug