mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fix for bug#24219 ALTER TABLE ... RENAME TO ... , DISABLE KEYS leads to crash
There was an improper order of doing chained operations. To the documentor: ENABLE|DISABLE KEYS combined with RENAME TO, and no other ALTER TABLE clause, leads to server crash independent of the presence of indices and data in the table.
This commit is contained in:
@ -543,3 +543,14 @@ ERROR 3D000: No database selected
|
||||
alter table test.t1 rename test.t1;
|
||||
use test;
|
||||
drop table t1;
|
||||
DROP TABLE IF EXISTS bug24219;
|
||||
DROP TABLE IF EXISTS bug24219_2;
|
||||
CREATE TABLE bug24219 (a INT, INDEX(a));
|
||||
SHOW INDEX FROM bug24219;
|
||||
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
|
||||
bug24219 1 a 1 a A NULL NULL NULL YES BTREE
|
||||
ALTER TABLE bug24219 RENAME TO bug24219_2, DISABLE KEYS;
|
||||
SHOW INDEX FROM bug24219_2;
|
||||
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
|
||||
bug24219_2 1 a 1 a A NULL NULL NULL YES BTREE disabled
|
||||
DROP TABLE bug24219_2;
|
||||
|
Reference in New Issue
Block a user