summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-04-09 15:47:25 +0200
committerSergei Golubchik <sergii@pisem.net>2013-04-09 15:47:25 +0200
commita489ae89b9ffe427963745f13c44e1e4d67494f4 (patch)
tree71b649afbf23e64910df07c20d3f914343a57b07 /mysql-test
parente5a323e107767ceb5106b85d077d4ac9d2d37778 (diff)
downloadmariadb-git-a489ae89b9ffe427963745f13c44e1e4d67494f4.tar.gz
fix mysql_rm_table_no_locks() not to use dd_frm_type, because the frm file
may not exist (the table exists only in the engine).
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/include/mix1.inc6
-rw-r--r--mysql-test/r/plugin.result8
-rw-r--r--mysql-test/suite/innodb/r/innodb_mysql.result7
-rw-r--r--mysql-test/t/plugin.test21
4 files changed, 29 insertions, 13 deletions
diff --git a/mysql-test/include/mix1.inc b/mysql-test/include/mix1.inc
index e7ea8b3d25a..75ba0e43221 100644
--- a/mysql-test/include/mix1.inc
+++ b/mysql-test/include/mix1.inc
@@ -630,15 +630,9 @@ copy_file $MYSQLD_DATADIR/test/t1.frm $MYSQLD_DATADIR/test/bug29807.frm;
--error ER_NO_SUCH_TABLE_IN_ENGINE
select * from bug29807;
drop table t1;
---error ER_BAD_TABLE_ERROR
drop table bug29807;
-create table bug29807 (a int);
-drop table bug29807;
---disable_query_log
call mtr.add_suppression("InnoDB: Error: table .test...bug29807. does not exist in the InnoDB internal");
call mtr.add_suppression("Cannot find or open table test\/bug29807 from");
-call mtr.add_suppression("Table 'test.bug29807' doesn't exist in engine");
---enable_query_log
#
diff --git a/mysql-test/r/plugin.result b/mysql-test/r/plugin.result
index 62864d0f16d..ac2ba843131 100644
--- a/mysql-test/r/plugin.result
+++ b/mysql-test/r/plugin.result
@@ -35,7 +35,9 @@ PLUGIN_LICENSE GPL
LOAD_OPTION ON
PLUGIN_MATURITY Experimental
PLUGIN_AUTH_VERSION 3.14.15.926
-CREATE TABLE t1(a int) ENGINE=EXAMPLE;
+CREATE TABLE t1 (a int) ENGINE=EXAMPLE;
+CREATE TABLE t2 (a int) ENGINE=EXAMPLE;
+FLUSH TABLES;
SELECT * FROM t1;
a
set global example_ulong_var=500;
@@ -65,6 +67,10 @@ LOAD_OPTION ON
PLUGIN_MATURITY Experimental
PLUGIN_AUTH_VERSION 0.1
DROP TABLE t1;
+select * from information_schema.plugins where plugin_library like 'ha_example%';
+SELECT * FROM t2;
+ERROR 42000: Unknown storage engine 'EXAMPLE'
+DROP TABLE t2;
UNINSTALL PLUGIN EXAMPLE;
ERROR 42000: PLUGIN EXAMPLE does not exist
UNINSTALL PLUGIN non_exist;
diff --git a/mysql-test/suite/innodb/r/innodb_mysql.result b/mysql-test/suite/innodb/r/innodb_mysql.result
index d963c4cc89b..7247b26e86b 100644
--- a/mysql-test/suite/innodb/r/innodb_mysql.result
+++ b/mysql-test/suite/innodb/r/innodb_mysql.result
@@ -633,9 +633,10 @@ select * from bug29807;
ERROR 42S02: Table 'test.bug29807' doesn't exist in engine
drop table t1;
drop table bug29807;
-ERROR 42S02: Unknown table 'bug29807'
-create table bug29807 (a int);
-drop table bug29807;
+Warnings:
+Warning 155 Table 'test.bug29807' doesn't exist in engine
+call mtr.add_suppression("InnoDB: Error: table .test...bug29807. does not exist in the InnoDB internal");
+call mtr.add_suppression("Cannot find or open table test\/bug29807 from");
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
switch to connection c1
diff --git a/mysql-test/t/plugin.test b/mysql-test/t/plugin.test
index 4412383f837..71ca860e269 100644
--- a/mysql-test/t/plugin.test
+++ b/mysql-test/t/plugin.test
@@ -16,12 +16,13 @@ INSTALL SONAME 'ha_example';
--replace_regex /\.dll/.so/
--query_vertical select * from information_schema.plugins where plugin_library like 'ha_example%'
-CREATE TABLE t1(a int) ENGINE=EXAMPLE;
+CREATE TABLE t1 (a int) ENGINE=EXAMPLE;
+CREATE TABLE t2 (a int) ENGINE=EXAMPLE;
+FLUSH TABLES;
# Let's do some advanced ops with the example engine :)
SELECT * FROM t1;
-
# a couple of tests for variables
set global example_ulong_var=500;
set global example_enum_var= e1;
@@ -29,12 +30,26 @@ show status like 'example%';
show variables like 'example%';
UNINSTALL SONAME 'ha_example';
+
+# the engine is NOT uninstalled yet,
+# because the table `t1` is open, sitting in the table defintion cache
+
--replace_column 5 #
--replace_regex /\.dll/.so/
--query_vertical select * from information_schema.plugins where plugin_library like 'ha_example%'
-
DROP TABLE t1;
+# now the engine IS unloaded
+# and the table `t2` belongs to an unknown engine
+
+--replace_column 5 #
+--replace_regex /\.dll/.so/
+--query_vertical select * from information_schema.plugins where plugin_library like 'ha_example%'
+--error ER_UNKNOWN_STORAGE_ENGINE
+SELECT * FROM t2;
+DROP TABLE t2;
+
+
--error 1305
UNINSTALL PLUGIN EXAMPLE;