1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Bug #54606 innodb fast alter table + pack_keys=0 prevents

adding new indexes

A fast alter table requires that the existing (old) table
and indices are unchanged (i.e only new indices can be
added).  To verify this, the layout and flags of the old
table/indices are compared for equality with the new.

The PACK_KEYS option is a no-op in InnoDB, but the flag
exists, and is used in the table compare.  We need to
check this (table) option flag before deciding whether an 
index should be packed or not.  If the table has
explicitly set PACK_KEYS to 0, the created indices should
not be marked as packed/packable.
This commit is contained in:
Magne Mahre
2010-09-16 12:51:08 +02:00
parent 0c91b53d10
commit ebd207baa8
3 changed files with 25 additions and 0 deletions

View File

@ -2390,4 +2390,14 @@ a
2
UPDATE t1,t2 SET t1.a = t1.a + 100 WHERE t1.a = 1;
DROP TABLE t1,t2;
#
# Bug#54606 innodb fast alter table + pack_keys=0
# prevents adding new indexes
#
CREATE TABLE t1 (a INT, b CHAR(9), c INT, key(b))
ENGINE=InnoDB
PACK_KEYS=0;
CREATE INDEX a ON t1 (a);
CREATE INDEX c on t1 (c);
DROP TABLE t1;
End of 5.1 tests