[MDEV-11335] Changing delay_key_write option for MyISAM table should not copy rows Created: 2016-11-22  Updated: 2020-08-25  Resolved: 2017-05-24

Status: Closed
Project: MariaDB Server
Component/s: Data Definition - Alter Table, Storage Engine - MyISAM
Affects Version/s: 5.5, 10.0, 10.1
Fix Version/s: 10.1.24, 10.2.7

Type: Bug Priority: Major
Reporter: Valerii Kravchuk Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: MyISAM, upstream

Issue Links:
Relates
relates to MDEV-12836 Avoid table rebuild when removing of ... Closed
relates to MDEV-13636 ALTER TABLE ... DELAY_KEY_WRITE=1 cre... Closed

 Description   

Currently, changing delay_key_write option for MyISAM table using ALTER TABLE statement copies all table rows to a temporary table during alteration. However, it is totally unnecessary. Changing this attribute should not copy rows.

One can just create a table with the same structure and this option set and then copy/rename .frm file, but why to rely on workaround when this can be implemented by server itself?

See https://bugs.mysql.com/bug.php?id=45492 upstream MySQL bug also.



 Comments   
Comment by Sergei Golubchik [ 2017-01-16 ]

This is a bit tricky. delay_key_write option is stored in the MYI file and MyISAM does not support rewriting MYI header only, it has to recreate the whole MYI file.

Generated at Thu Feb 08 07:49:09 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.