summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2011-06-21 17:40:51 +0200
committerSergei Golubchik <sergii@pisem.net>2011-06-21 17:40:51 +0200
commit135ce0ba6c9457c4c968b420a16e5bda69f222e0 (patch)
tree837654847eb87ba88b3d2e87cf174e3b661fd475 /mysql-test
parent018614e2b348598f4518e11156fb44c388d2bf32 (diff)
downloadmariadb-git-135ce0ba6c9457c4c968b420a16e5bda69f222e0.tar.gz
lp:790513 MariaDB crashes on startup
initialize plugins earlier, to support, for example, non-MyISAM mysql.plugin table.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/plugin_innodb.result11
-rw-r--r--mysql-test/t/plugin_innodb.test27
2 files changed, 38 insertions, 0 deletions
diff --git a/mysql-test/r/plugin_innodb.result b/mysql-test/r/plugin_innodb.result
new file mode 100644
index 00000000000..48510ad8745
--- /dev/null
+++ b/mysql-test/r/plugin_innodb.result
@@ -0,0 +1,11 @@
+install plugin example soname 'ha_example.so';
+create table t1(a int) engine=example;
+drop table t1;
+alter table mysql.plugin engine=innodb;
+restart
+create table t1(a int) engine=example;
+select * from t1;
+a
+drop table t1;
+alter table mysql.plugin engine=myisam;
+uninstall plugin example;
diff --git a/mysql-test/t/plugin_innodb.test b/mysql-test/t/plugin_innodb.test
new file mode 100644
index 00000000000..fb5dd84b997
--- /dev/null
+++ b/mysql-test/t/plugin_innodb.test
@@ -0,0 +1,27 @@
+--source include/not_embedded.inc
+--source include/have_example_plugin.inc
+--source include/have_innodb.inc
+
+if (!`select count(*) from information_schema.plugins
+ where plugin_name = 'innodb' and plugin_status = 'active' and
+ plugin_library is null`) {
+ skip Need compiled-in InnoDB;
+}
+
+
+--replace_regex /\.dll/.so/
+eval install plugin example soname '$HA_EXAMPLE_SO';
+create table t1(a int) engine=example;
+drop table t1;
+
+alter table mysql.plugin engine=innodb;
+--echo restart
+--source include/restart_mysqld.inc
+
+create table t1(a int) engine=example;
+select * from t1;
+drop table t1;
+
+alter table mysql.plugin engine=myisam;
+uninstall plugin example;
+