mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
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.
This commit is contained in:
@ -321,3 +321,13 @@ UNUSABLE
|
||||
uninstall soname 'ha_example';
|
||||
select plugin_name from information_schema.plugins where plugin_library like 'ha_example%';
|
||||
plugin_name
|
||||
#
|
||||
# MDEV-5309 - RENAME TABLE does not check for existence of the table's
|
||||
# engine
|
||||
#
|
||||
INSTALL PLUGIN example SONAME 'ha_example';
|
||||
CREATE TABLE t1(a INT) ENGINE=EXAMPLE;
|
||||
UNINSTALL PLUGIN example;
|
||||
RENAME TABLE t1 TO t2;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
DROP TABLE t1;
|
||||
|
Reference in New Issue
Block a user