clarify the test case

This commit is contained in:
Sergei Golubchik 2015-05-03 11:51:22 +02:00
parent 0759568b88
commit dbe97bcc56
5 changed files with 28 additions and 32 deletions

View File

@ -15,3 +15,14 @@ SELECT 'bug' as '' FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb'
and SUPPORT='YES';
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;

View File

@ -1,8 +0,0 @@
#
# 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

View File

@ -64,18 +64,28 @@ SELECT 'bug' as '' FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb'
--source include/not_windows_embedded.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`;
eval SELECT "install plugin example soname '$HA_EXAMPLE_SO';" INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/install_plugin.sql';
--enable_query_log
--write_file $MYSQLTEST_VARDIR/tmp/install_plugin.sql
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
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
use test;
create table t1(a int) engine=example;
drop table t1;
EOF
--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;

View File

@ -1 +0,0 @@
--skip-grant-tables

View File

@ -1,16 +0,0 @@
--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