summaryrefslogtreecommitdiff
path: root/mysql-test/t/plugin.test
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2015-06-15 15:37:14 +0400
committerSergey Vojtovich <svoj@mariadb.org>2015-06-16 12:12:17 +0400
commit909f7607018e644754a2c41b791b44b25a05e8fb (patch)
treed49a8ce3a3c08491245446fd4672268856e5361a /mysql-test/t/plugin.test
parentb988553c527d0fb55a561dc3a1308052d94ae2a4 (diff)
downloadmariadb-git-909f7607018e644754a2c41b791b44b25a05e8fb.tar.gz
MDEV-5309 - RENAME TABLE does not check for existence of the table's engine
When RENAME TABLE is executed, it apparently does not check whether the engine is available (unlike ALTER TABLE .. RENAME, which does). It means that if the engine in question was not loaded on some reason, the table might become unusable, since the engine won't know about the change. With this patch RENAME TABLE fails if storage engine is not available.
Diffstat (limited to 'mysql-test/t/plugin.test')
-rw-r--r--mysql-test/t/plugin.test11
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/t/plugin.test b/mysql-test/t/plugin.test
index 0655aff9fc9..9c2a408b612 100644
--- a/mysql-test/t/plugin.test
+++ b/mysql-test/t/plugin.test
@@ -252,3 +252,14 @@ select plugin_name from information_schema.plugins where plugin_library like 'ha
uninstall soname 'ha_example';
select plugin_name from information_schema.plugins where plugin_library like 'ha_example%';
+
+--echo #
+--echo # MDEV-5309 - RENAME TABLE does not check for existence of the table's
+--echo # engine
+--echo #
+INSTALL PLUGIN example SONAME 'ha_example';
+CREATE TABLE t1(a INT) ENGINE=EXAMPLE;
+UNINSTALL PLUGIN example;
+--error ER_NO_SUCH_TABLE
+RENAME TABLE t1 TO t2;
+DROP TABLE t1;