summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-05-03 11:51:22 +0200
committerSergei Golubchik <serg@mariadb.org>2015-05-03 11:51:22 +0200
commitdbe97bcc56b22da85753d853277f47c47ff42ec1 (patch)
tree547acf651cd33fe334ca53f3d04d5f27c2bc301d
parent0759568b886b8fa788a6936fadf8b7a4d85d779c (diff)
downloadmariadb-git-dbe97bcc56b22da85753d853277f47c47ff42ec1.tar.gz
clarify the test case
-rw-r--r--mysql-test/r/bootstrap.result11
-rw-r--r--mysql-test/r/bug46261.result8
-rw-r--r--mysql-test/t/bootstrap.test24
-rw-r--r--mysql-test/t/bug46261-master.opt1
-rw-r--r--mysql-test/t/bug46261.test16
5 files changed, 28 insertions, 32 deletions
diff --git a/mysql-test/r/bootstrap.result b/mysql-test/r/bootstrap.result
index c4775a787f2..bb80cf28b56 100644
--- a/mysql-test/r/bootstrap.result
+++ b/mysql-test/r/bootstrap.result
@@ -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;
diff --git a/mysql-test/r/bug46261.result b/mysql-test/r/bug46261.result
deleted file mode 100644
index dcc950d1baf..00000000000
--- a/mysql-test/r/bug46261.result
+++ /dev/null
@@ -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
diff --git a/mysql-test/t/bootstrap.test b/mysql-test/t/bootstrap.test
index d690c1c63d0..97376eb7412 100644
--- a/mysql-test/t/bootstrap.test
+++ b/mysql-test/t/bootstrap.test
@@ -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;
diff --git a/mysql-test/t/bug46261-master.opt b/mysql-test/t/bug46261-master.opt
deleted file mode 100644
index 5699a3387b8..00000000000
--- a/mysql-test/t/bug46261-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---skip-grant-tables
diff --git a/mysql-test/t/bug46261.test b/mysql-test/t/bug46261.test
deleted file mode 100644
index 9d8eecf3d52..00000000000
--- a/mysql-test/t/bug46261.test
+++ /dev/null
@@ -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