Description:
Hello!
This bug report is based on the following mail to internals@lists.mysql.com
http://lists.mysql.com/internals/38545.
New implementation of in-place ALTER TABLE in 5.6 always marks all existing prefix keys in the table being altered as being dropped and then re-created again. In cases when storage engine doesn't support in-place addition of keys this results in all almost all ALTERs on such table being carried using COPY algorithm. In cases when storage engine supports in-place creation of keys this probably results in extra unnecessary work being carried out by such an ALTER.
This is a regression from 5.5
See How-to-repeat for example.
How to repeat:
# Here is the script for mysqltest tool showing the problem.
CREATE TABLE t1 (a varchar(256) DEFAULT NULL, KEY a(a(50)));
INSERT INTO t1 VALUES ('Test');
--echo # The below statement should always be carried using fast/in-place
--echo # algorithm. So no rows should be copied (number of affected rows
--echo # should be zero). Unfortunately this is not true in 5.6.
--enable_info
ALTER TABLE t1 COMMENT='comment';
# affected rows: 1
# info: Records: 1 Duplicates: 0 Warnings: 0
--disable_info