Commit 915afddb authored by Monty's avatar Monty

main.alter_table_lock could fail with query "'LOCK TABLE t1 WRITE' failed"

Backported fix from MariaDB 10.5
parent ddb1f7c4
......@@ -11,8 +11,6 @@ ERROR 42S02: Table 'test.x' doesn't exist
SET SESSION max_session_mem_used= 8192;
LOCK TABLE t1 WRITE;
ALTER TABLE t1 CHANGE COLUMN IF EXISTS b c INT;
Warnings:
Note 1054 Unknown column 'b' in 't1'
SET SESSION max_session_mem_used = @max_session_mem_used_save;
UNLOCK TABLES;
DROP TABLE t1;
......
......@@ -14,9 +14,13 @@ SELECT * FROM t1;
ALTER TABLE x MODIFY xx INT;
SET SESSION max_session_mem_used= 8192;
--error 0,ER_OPTION_PREVENTS_STATEMENT
LOCK TABLE t1 WRITE;
--disable_warnings
--error 0,ER_OPTION_PREVENTS_STATEMENT
ALTER TABLE t1 CHANGE COLUMN IF EXISTS b c INT;
--enable_warnings
SET SESSION max_session_mem_used = @max_session_mem_used_save;
UNLOCK TABLES;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment