Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
In MySQL 8, it's possible to use RENAME on a table that is locked with a write lock.
https://dev.mysql.com/doc/refman/8.0/en/rename-table.html
In MySQL 8, the following would work:
CREATE TABLE t (id INT);
|
LOCK TABLE t WRITE;
|
RENAME TABLE t TO t2;
|
In MariaDB, this fails with:
RENAME TABLE t TO t2;
|
ERROR 1192 (HY000): Can't execute the given command because you have active locked tables or an active transaction
|
See also https://stackoverflow.com/questions/36202298/renaming-a-locked-table
Attachments
Issue Links
- is part of
-
MDEV-28906 MySQL 8.0 desired compatibility
- Open
note that
succeeds (in 10.6 at least) and that makes the table unaccessible, "table t2 was not locked with lock tables" error.