[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: |
|
||||||||||||
| 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. |