2011-07-19 16:17:58 +02:00
|
|
|
#
|
|
|
|
# Test mysql_plugin tool
|
|
|
|
#
|
2011-08-09 14:58:18 +02:00
|
|
|
# This test contains test cases for testing the mysql_plugin client with
|
|
|
|
# the daemon_example plugin. Test cases include tests for:
|
|
|
|
#
|
|
|
|
# - successful enable/disable
|
|
|
|
# - incorrect paths
|
|
|
|
# - missing paths/options
|
|
|
|
#
|
|
|
|
# Implementation Notes
|
|
|
|
#
|
|
|
|
# The mysql_plugin tool now accepts --mysqld the path to mysqld server. The
|
|
|
|
# mysqld path is extracted from MYSQLD_BOOTSTRAP_CMD line. We also extract
|
|
|
|
# the path of MYSQLD_BASEDIR (where mysql exists) and use it for the errmsg
|
|
|
|
# file. The directories differ between Windows and Unix but the Perl script
|
|
|
|
# included below will pick as per platform.
|
|
|
|
#
|
|
|
|
# The test is also designed to issue the --skip directive if the location of
|
|
|
|
# the mysqld, my_print_defaults, or daemon_example.ini files cannot be found.
|
|
|
|
#
|
2011-07-19 16:17:58 +02:00
|
|
|
|
2011-07-19 16:35:03 +02:00
|
|
|
--source include/not_embedded.inc
|
2011-07-19 16:17:58 +02:00
|
|
|
|
|
|
|
# Add the datadir, basedir, plugin_dir to the bootstrap command
|
|
|
|
let $MYSQLD_DATADIR= `select @@datadir`;
|
2011-07-19 16:35:03 +02:00
|
|
|
let $MYSQL_BASEDIR= `select @@basedir`;
|
2011-08-09 14:58:18 +02:00
|
|
|
let $MYSQL_ERRMSG_BASEDIR=`select @@lc_messages_dir`;
|
|
|
|
let $PLUGIN_DIR=`select @@plugin_dir`;
|
2011-07-19 16:35:03 +02:00
|
|
|
|
|
|
|
--disable_abort_on_error
|
2011-08-09 14:58:18 +02:00
|
|
|
|
|
|
|
# Perl script to extract the location of the basedir from environment
|
|
|
|
# variables. This is needed to ensure the test will run on the PB machines
|
|
|
|
# designed to test release as well as debug builds. It also checks for the
|
|
|
|
# location of the my_print_defaults and daemon_example.ini files.
|
|
|
|
|
|
|
|
perl;
|
|
|
|
use File::Basename;
|
|
|
|
my ($mysqld)= split " ", $ENV{MYSQLD_BOOTSTRAP_CMD};
|
|
|
|
my $mysqld_basedir=dirname($mysqld);
|
|
|
|
my $my_print_defaults= $ENV{MYSQL_MY_PRINT_DEFAULTS};
|
|
|
|
my $my_print_defaults_basedir=dirname($my_print_defaults);
|
|
|
|
my $daemonexample_ini= "$ENV{DAEMONEXAMPLE_DIR}/daemon_example.ini";
|
|
|
|
my $plugindir_ini= "$ENV{PLUGIN_DIR}/daemon_example.ini";
|
|
|
|
my $notfound= "";
|
|
|
|
open(FILE, ">", "$ENV{MYSQL_TMP_DIR}/mysqld.inc") or die;
|
|
|
|
print FILE "let \$MYSQLD_BASEDIR= $mysqld_basedir;\n";
|
|
|
|
print FILE "let \$MYSQL_MY_PRINT_DEFAULTS_BASEDIR= $my_print_defaults_basedir;\n";
|
|
|
|
if ((!-e $daemonexample_ini) || (!-r $daemonexample_ini))
|
|
|
|
{
|
|
|
|
print FILE "let \$DAEMONEXAMPLE_DIR= $not_found;\n";
|
|
|
|
}
|
|
|
|
if ((!-e $plugindir_ini) || (!-r $plugindir_ini))
|
|
|
|
{
|
|
|
|
print FILE "let \$PLUGIN_DIR= $not_found;\n";
|
|
|
|
}
|
|
|
|
close FILE;
|
|
|
|
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.
|
|
|
|
|
|
|
|
--mkdir $MYSQLD_BASEDIR/share
|
|
|
|
--mkdir $MYSQLD_BASEDIR/share/mysql
|
|
|
|
--copy_file $MYSQL_ERRMSG_BASEDIR/english/errmsg.sys $MYSQLD_BASEDIR/share/errmsg.sys
|
|
|
|
--copy_file $MYSQL_ERRMSG_BASEDIR/english/errmsg.sys $MYSQLD_BASEDIR/share/mysql/errmsg.sys
|
|
|
|
|
|
|
|
# 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.
|
|
|
|
|
|
|
|
# Check for my_print_defaults location. Skip if not found.
|
|
|
|
if ($MYSQL_MY_PRINT_DEFAULTS_BASEDIR == '')
|
|
|
|
{
|
|
|
|
--skip Test requires known location of my_print_defaults executable.
|
|
|
|
}
|
|
|
|
|
|
|
|
# Check for mysqld location. Skip if not found.
|
|
|
|
if ($MYSQLD == '')
|
2011-07-19 16:35:03 +02:00
|
|
|
{
|
2011-08-09 14:58:18 +02:00
|
|
|
--skip Test requires known location of mysqld executable.
|
2011-07-19 16:35:03 +02:00
|
|
|
}
|
2011-08-09 14:58:18 +02:00
|
|
|
|
|
|
|
# Check for daemon_example.ini location. Skip if not found in either
|
|
|
|
# the plugin_dir path or the daemon_example_dir path.
|
|
|
|
if ($PLUGIN_DIR == '')
|
2011-07-19 16:35:03 +02:00
|
|
|
{
|
2011-08-09 14:58:18 +02:00
|
|
|
if ($DAEMONEXAMPLE_DIR == '')
|
|
|
|
{
|
|
|
|
--skip Test requires known location of daemon_example.ini file.
|
|
|
|
}
|
|
|
|
let $PLUGIN_DIR = $DAEMONEXAMPLE_DIR;
|
2011-07-19 16:35:03 +02:00
|
|
|
}
|
|
|
|
|
2011-08-09 14:58:18 +02:00
|
|
|
# Build client command for reuse.
|
|
|
|
|
2011-08-09 21:09:28 +02:00
|
|
|
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;
|
2011-07-19 16:17:58 +02:00
|
|
|
|
|
|
|
--echo #
|
|
|
|
--echo # Ensure the plugin isn't loaded.
|
|
|
|
--echo #
|
2011-10-17 21:30:28 +02:00
|
|
|
SELECT * FROM mysql.plugin WHERE dl like 'libdaemon%' ORDER BY name;
|
2011-07-19 16:17:58 +02:00
|
|
|
|
|
|
|
--echo #
|
|
|
|
--echo # Enable the plugin...
|
|
|
|
--echo #
|
2013-02-25 15:07:46 +01:00
|
|
|
|
|
|
|
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
2011-07-19 16:17:58 +02:00
|
|
|
--shutdown_server 10
|
|
|
|
--source include/wait_until_disconnected.inc
|
|
|
|
|
|
|
|
#
|
|
|
|
# Enable the plugin
|
|
|
|
#
|
2011-08-09 14:58:18 +02:00
|
|
|
--exec $MYSQL_PLUGIN_CMD ENABLE daemon_example
|
2011-07-19 16:17:58 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# Ensure enabling an enabled plugin doesn't fail
|
2011-08-09 14:58:18 +02:00
|
|
|
--exec $MYSQL_PLUGIN_CMD ENABLE daemon_example
|
2011-07-19 16:17:58 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# Restart the server
|
|
|
|
#
|
2013-02-25 15:07:46 +01:00
|
|
|
|
|
|
|
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
2011-07-19 16:17:58 +02:00
|
|
|
--enable_reconnect
|
|
|
|
--source include/wait_until_connected_again.inc
|
|
|
|
|
2011-10-17 21:30:28 +02:00
|
|
|
--echo #
|
|
|
|
--echo # Simulate loading a plugin libary with multiple entry points.
|
|
|
|
--echo # This will test the DISABLE to ensure all rows are removed.
|
|
|
|
--echo #
|
2011-11-04 13:59:28 +01:00
|
|
|
--replace_regex /\.dll/.so/
|
2011-10-17 21:30:28 +02:00
|
|
|
eval INSERT INTO mysql.plugin VALUES ('wicky', '$DAEMONEXAMPLE');
|
2011-11-04 13:59:28 +01:00
|
|
|
--replace_regex /\.dll/.so/
|
2011-10-17 21:30:28 +02:00
|
|
|
eval INSERT INTO mysql.plugin VALUES ('wacky', '$DAEMONEXAMPLE');
|
2011-11-04 13:59:28 +01:00
|
|
|
--replace_regex /\.dll/.so/
|
2011-10-17 21:30:28 +02:00
|
|
|
eval INSERT INTO mysql.plugin VALUES ('wonky', '$DAEMONEXAMPLE');
|
|
|
|
|
2011-07-19 16:17:58 +02:00
|
|
|
--echo #
|
|
|
|
--echo # Ensure the plugin is now loaded.
|
|
|
|
--echo #
|
|
|
|
--replace_regex /\.dll/.so/
|
2011-10-17 21:30:28 +02:00
|
|
|
SELECT * FROM mysql.plugin WHERE dl like 'libdaemon%' ORDER BY name;
|
2011-07-19 16:17:58 +02:00
|
|
|
|
2013-02-25 15:07:46 +01:00
|
|
|
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
2012-01-24 17:08:57 +01:00
|
|
|
--shutdown_server 10
|
|
|
|
--source include/wait_until_disconnected.inc
|
|
|
|
|
|
|
|
#
|
|
|
|
# Disable the plugin - to remove winky, wonky entries
|
|
|
|
#
|
|
|
|
--exec $MYSQL_PLUGIN_CMD DISABLE daemon_example
|
|
|
|
|
|
|
|
#
|
|
|
|
# Enable the plugin again
|
|
|
|
#
|
|
|
|
--exec $MYSQL_PLUGIN_CMD ENABLE daemon_example
|
|
|
|
|
|
|
|
#
|
|
|
|
# Restart the server
|
|
|
|
#
|
2013-02-25 15:07:46 +01:00
|
|
|
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
2012-01-24 17:08:57 +01:00
|
|
|
--enable_reconnect
|
|
|
|
--source include/wait_until_connected_again.inc
|
|
|
|
|
|
|
|
--echo #
|
|
|
|
--echo # Ensure the plugin is loaded.
|
|
|
|
--echo #
|
|
|
|
--replace_regex /\.dll/.so/
|
|
|
|
SELECT * FROM mysql.plugin WHERE dl like '%libdaemon%' ORDER BY name;
|
|
|
|
|
2013-02-25 15:07:46 +01:00
|
|
|
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
2012-01-24 17:08:57 +01:00
|
|
|
--shutdown_server 10
|
|
|
|
--source include/wait_until_disconnected.inc
|
|
|
|
|
|
|
|
# To test the case where the same plugin is reloaded with a different soname,
|
|
|
|
# we must copy the example daemon to a new location renaming it.
|
|
|
|
|
|
|
|
let $DAEMON_RELOAD = lib$DAEMONEXAMPLE;
|
|
|
|
--copy_file $PLUGIN_DIR/$DAEMONEXAMPLE $PLUGIN_DIR/$DAEMON_RELOAD
|
|
|
|
--copy_file include/libdaemon_example.ini $PLUGIN_DIR/libdaemon_example.ini
|
|
|
|
|
|
|
|
# Now reload it and see that it is a different name.
|
|
|
|
--exec $MYSQL_PLUGIN_CMD ENABLE libdaemon_example
|
|
|
|
|
|
|
|
#
|
|
|
|
# Restart the server
|
|
|
|
#
|
2013-02-25 15:07:46 +01:00
|
|
|
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
2012-01-24 17:08:57 +01:00
|
|
|
--enable_reconnect
|
|
|
|
--source include/wait_until_connected_again.inc
|
|
|
|
|
|
|
|
--echo #
|
|
|
|
--echo # Ensure the plugin is replaced.
|
|
|
|
--echo #
|
|
|
|
--replace_regex /\.dll/.so/
|
|
|
|
SELECT * FROM mysql.plugin WHERE dl like '%libdaemon%' ORDER BY name;
|
|
|
|
|
2011-07-19 16:17:58 +02:00
|
|
|
--echo #
|
|
|
|
--echo # Disable the plugin...
|
|
|
|
--echo #
|
2013-02-25 15:07:46 +01:00
|
|
|
|
|
|
|
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
2011-07-19 16:17:58 +02:00
|
|
|
--shutdown_server 10
|
|
|
|
--source include/wait_until_disconnected.inc
|
|
|
|
|
|
|
|
#
|
|
|
|
# Disable the plugin
|
|
|
|
#
|
2012-01-24 17:08:57 +01:00
|
|
|
--exec $MYSQL_PLUGIN_CMD DISABLE libdaemon_example
|
|
|
|
|
|
|
|
# Remove files for last test case.
|
|
|
|
|
|
|
|
--remove_file $PLUGIN_DIR/$DAEMON_RELOAD
|
|
|
|
--remove_file $DAEMONEXAMPLE_DIR/libdaemon_example.ini
|
2011-07-19 16:17:58 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# Restart the server
|
|
|
|
#
|
2013-02-25 15:07:46 +01:00
|
|
|
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
2011-07-19 16:17:58 +02:00
|
|
|
--enable_reconnect
|
|
|
|
--source include/wait_until_connected_again.inc
|
|
|
|
|
|
|
|
--echo #
|
|
|
|
--echo # Ensure the plugin isn't loaded.
|
|
|
|
--echo #
|
2012-01-24 17:08:57 +01:00
|
|
|
SELECT * FROM mysql.plugin WHERE dl like '%libdaemon%' ORDER BY name;
|
2011-07-19 16:17:58 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# Stop the server for error conditions
|
|
|
|
#
|
2013-02-25 15:07:46 +01:00
|
|
|
|
|
|
|
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
2011-07-19 16:17:58 +02:00
|
|
|
--shutdown_server 10
|
|
|
|
--source include/wait_until_disconnected.inc
|
|
|
|
|
|
|
|
--echo #
|
|
|
|
--echo # Attempt to load non-existant plugin
|
|
|
|
--echo #
|
|
|
|
--error 1,2,256
|
2011-08-09 14:58:18 +02:00
|
|
|
--exec $MYSQL_PLUGIN_CMD DISABLE NOT_THERE_AT_ALL 2>&1
|
2011-07-19 16:17:58 +02:00
|
|
|
|
|
|
|
--echo #
|
|
|
|
--echo # Attempt to use non-existant plugin.ini file
|
|
|
|
--echo #
|
2011-07-19 16:35:03 +02:00
|
|
|
--error 1,2,7,256
|
2011-08-09 14:58:18 +02:00
|
|
|
--exec $MYSQL_PLUGIN_CMD DISABLE daemon_example --plugin-ini=/NOT/THERE/pi.ini 2>&1
|
2011-07-19 16:17:58 +02:00
|
|
|
|
|
|
|
--echo #
|
|
|
|
--echo # Attempt to omit the plugin
|
|
|
|
--echo #
|
|
|
|
--error 1,2,256
|
2011-08-09 14:58:18 +02:00
|
|
|
--exec $MYSQL_PLUGIN_CMD DISABLE 2>&1
|
2011-07-19 16:17:58 +02:00
|
|
|
|
|
|
|
--echo #
|
|
|
|
--echo # Attempt to omit DISABLE|ENABLE
|
|
|
|
--echo #
|
|
|
|
--error 1,2,256
|
2011-08-09 14:58:18 +02:00
|
|
|
--exec $MYSQL_PLUGIN_CMD daemon_example 2>&1
|
2011-07-19 16:17:58 +02:00
|
|
|
|
|
|
|
--echo #
|
|
|
|
--echo # Attempt to use bad paths - datadir
|
|
|
|
--echo #
|
2011-08-09 21:09:28 +02:00
|
|
|
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;
|
2011-07-19 16:17:58 +02:00
|
|
|
--error 1,2,256
|
2011-08-09 14:58:18 +02:00
|
|
|
--exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
|
2011-07-19 16:17:58 +02:00
|
|
|
|
|
|
|
--echo #
|
|
|
|
--echo # Attempt to use bad paths - basedir
|
|
|
|
--echo #
|
2011-08-09 21:09:28 +02:00
|
|
|
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;
|
2011-09-09 16:39:44 +02:00
|
|
|
replace_result "/basedir_not_there//" "/basedir_not_there/";
|
2011-07-19 16:17:58 +02:00
|
|
|
--error 1,2,256
|
2011-08-09 14:58:18 +02:00
|
|
|
--exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
|
2011-07-19 16:17:58 +02:00
|
|
|
|
|
|
|
--echo #
|
|
|
|
--echo # Attempt to use bad paths - plugin_dir
|
|
|
|
--echo #
|
2011-08-09 21:09:28 +02:00
|
|
|
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;
|
2011-08-09 14:58:18 +02:00
|
|
|
--error 1,2,256
|
|
|
|
--exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
|
|
|
|
|
|
|
|
--echo #
|
|
|
|
--echo # Attempt to use bad paths - mysqld
|
|
|
|
--echo #
|
|
|
|
let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=$MYSQL_BASEDIR --plugin-dir=$PLUGIN_DIR --mysqld=/mysqld_not_there/ --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 - my_print_defaults
|
|
|
|
--echo #
|
2011-08-09 21:09:28 +02:00
|
|
|
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/;
|
2011-07-19 16:17:58 +02:00
|
|
|
--error 1,2,256
|
2011-08-09 14:58:18 +02:00
|
|
|
--exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
|
|
|
|
|
2011-07-19 16:17:58 +02:00
|
|
|
|
|
|
|
--echo #
|
|
|
|
--echo # Missing library
|
|
|
|
--echo #
|
2011-08-09 21:09:28 +02:00
|
|
|
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;
|
2011-07-19 16:17:58 +02:00
|
|
|
--error 1,2,256
|
2011-08-09 14:58:18 +02:00
|
|
|
--exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
|
2011-07-19 16:17:58 +02:00
|
|
|
|
|
|
|
--echo #
|
|
|
|
--echo # Bad format for config file
|
|
|
|
--echo #
|
2011-08-09 21:09:28 +02:00
|
|
|
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;
|
2011-07-19 16:17:58 +02:00
|
|
|
--error 1,2,256
|
2011-08-09 14:58:18 +02:00
|
|
|
--exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
|
2011-07-19 16:17:58 +02:00
|
|
|
|
|
|
|
--echo #
|
|
|
|
--echo # Missing base_dir option
|
|
|
|
--echo #
|
2011-08-09 21:09:28 +02:00
|
|
|
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;
|
2011-07-19 16:17:58 +02:00
|
|
|
--error 1,2,139,256
|
2011-08-09 14:58:18 +02:00
|
|
|
--exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
|
2011-07-19 16:17:58 +02:00
|
|
|
|
|
|
|
--echo #
|
|
|
|
--echo # Missing data_dir option
|
|
|
|
--echo #
|
2011-08-09 21:09:28 +02:00
|
|
|
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;
|
2011-07-19 16:17:58 +02:00
|
|
|
--error 1,2,139,256
|
2011-08-09 14:58:18 +02:00
|
|
|
--exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
|
2011-07-19 16:17:58 +02:00
|
|
|
|
|
|
|
--echo #
|
|
|
|
--echo # Missing plugin_dir option
|
|
|
|
--echo #
|
2011-08-09 21:09:28 +02:00
|
|
|
let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQL_DATADIR --basedir=$MYSQL_BASEDIR --mysqld=$MYSQLD_BASEDIR --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
|
2011-07-19 16:17:58 +02:00
|
|
|
--error 1,2,139,256
|
2011-08-09 14:58:18 +02:00
|
|
|
--exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
|
2011-07-19 16:17:58 +02:00
|
|
|
|
|
|
|
--echo #
|
|
|
|
--echo # Show the help.
|
|
|
|
--echo #
|
|
|
|
replace_result $MYSQL_PLUGIN mysql_plugin;
|
2012-06-29 14:19:31 +02:00
|
|
|
--replace_regex /Ver [0-9.]+ Distrib [0-9.]+/Ver V.V.VV Distrib XX.XX.XX/ /XX-m[0-9]+/XX/ /XX[a-z]/XX/
|
2011-07-19 16:17:58 +02:00
|
|
|
--exec $MYSQL_PLUGIN --help
|
|
|
|
|
2011-07-19 16:35:03 +02:00
|
|
|
replace_result $MYSQL_PLUGIN mysql_plugin;
|
2012-06-29 14:19:31 +02:00
|
|
|
--replace_regex /Ver [0-9.]+ Distrib [0-9.]+/Ver V.V.VV Distrib XX.XX.XX/ /XX-m[0-9]+/XX/ /XX[a-z]/XX/
|
2011-07-19 16:35:03 +02:00
|
|
|
--exec $MYSQL_PLUGIN --version
|
|
|
|
|
2011-07-19 16:17:58 +02:00
|
|
|
#
|
|
|
|
# Restart the server
|
|
|
|
#
|
2013-02-25 15:07:46 +01:00
|
|
|
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
2011-07-19 16:17:58 +02:00
|
|
|
--enable_reconnect
|
|
|
|
--source include/wait_until_connected_again.inc
|
|
|
|
|
|
|
|
#
|
|
|
|
# Cleanup
|
2013-02-25 15:07:46 +01:00
|
|
|
|
|
|
|
--remove_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
2011-07-19 16:17:58 +02:00
|
|
|
|
2011-08-09 14:58:18 +02:00
|
|
|
# Cleanup the share folder in the binary path.
|
|
|
|
--remove_file $MYSQLD_BASEDIR/share/errmsg.sys
|
|
|
|
--rmdir $MYSQLD_BASEDIR/share/mysql
|
|
|
|
--rmdir $MYSQLD_BASEDIR/share
|
|
|
|
|
2011-07-19 16:35:03 +02:00
|
|
|
--enable_abort_on_error
|