Commit dbe97bcc authored by Sergei Golubchik's avatar Sergei Golubchik

clarify the test case

parent 0759568b
...@@ -15,3 +15,14 @@ SELECT 'bug' as '' FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb' ...@@ -15,3 +15,14 @@ SELECT 'bug' as '' FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb'
and SUPPORT='YES'; and SUPPORT='YES';
End of 5.5 tests End of 5.5 tests
flush tables;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select * from mysql.plugin;
name dl
EXAMPLE ha_example.so
truncate table mysql.plugin;
#
# Bug#46261 Plugins can be installed with --skip-grant-tables
#
INSTALL PLUGIN example SONAME 'ha_example.so';
ERROR HY000: The MariaDB server is running with the --skip-grant-tables option so it cannot execute this statement
UNINSTALL PLUGIN example;
ERROR HY000: The MariaDB server is running with the --skip-grant-tables option so it cannot execute this statement
End of 5.1 tests
...@@ -64,18 +64,28 @@ SELECT 'bug' as '' FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb' ...@@ -64,18 +64,28 @@ SELECT 'bug' as '' FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb'
--source include/not_windows_embedded.inc --source include/not_windows_embedded.inc
--source include/have_example_plugin.inc --source include/have_example_plugin.inc
# #
# Check that --bootstrap can load/unload plugins # Check that --bootstrap can install and uninstall plugins
# #
--disable_query_log
let $PLUGIN_DIR=`select @@plugin_dir`; let $PLUGIN_DIR=`select @@plugin_dir`;
eval SELECT "install plugin example soname '$HA_EXAMPLE_SO';" INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/install_plugin.sql'; --write_file $MYSQLTEST_VARDIR/tmp/install_plugin.sql
--enable_query_log install soname 'ha_example';
uninstall plugin unusable;
EOF
--exec $MYSQLD_BOOTSTRAP_CMD --plugin-dir=$PLUGIN_DIR < $MYSQLTEST_VARDIR/tmp/install_plugin.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1 --exec $MYSQLD_BOOTSTRAP_CMD --plugin-dir=$PLUGIN_DIR < $MYSQLTEST_VARDIR/tmp/install_plugin.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1
remove_file $MYSQLTEST_VARDIR/tmp/install_plugin.sql; --remove_file $MYSQLTEST_VARDIR/tmp/install_plugin.sql
#
# Check that installed plugins are *not* automatically loaded in --bootstrap
#
--write_file $MYSQLTEST_VARDIR/tmp/bootstrap_plugins.sql --write_file $MYSQLTEST_VARDIR/tmp/bootstrap_plugins.sql
use test; use test;
create table t1(a int) engine=example; create table t1(a int) engine=example;
drop table t1;
EOF EOF
--exec $MYSQLD_BOOTSTRAP_CMD --plugin-dir=$PLUGIN_DIR < $MYSQLTEST_VARDIR/tmp/bootstrap_plugins.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1 --exec $MYSQLD_BOOTSTRAP_CMD --plugin-dir=$PLUGIN_DIR < $MYSQLTEST_VARDIR/tmp/bootstrap_plugins.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1
remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_plugins.sql; --remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_plugins.sql
flush tables;
show create table t1;
drop table t1;
--replace_result .dll .so
select * from mysql.plugin;
truncate table mysql.plugin;
--source include/not_embedded.inc
--source include/have_example_plugin.inc
--echo #
--echo # Bug#46261 Plugins can be installed with --skip-grant-tables
--echo #
--replace_regex /\.dll/.so/
--error ER_OPTION_PREVENTS_STATEMENT
eval INSTALL PLUGIN example SONAME '$HA_EXAMPLE_SO';
--replace_regex /\.dll/.so/
--error ER_OPTION_PREVENTS_STATEMENT
eval UNINSTALL PLUGIN example;
--echo End of 5.1 tests
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment