[MDEV-9469] 'Incorrect key file' on ALTER TABLE Created: 2016-01-26 Updated: 2017-10-10 Resolved: 2016-02-15 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Alter Table, Storage Engine - InnoDB, Storage Engine - XtraDB |
| Affects Version/s: | 10.0.18, 10.0.23, 10.1.10, 10.0, 10.1 |
| Fix Version/s: | 10.0.24 |
| Type: | Bug | Priority: | Major |
| Reporter: | Thomas Mischke | Assignee: | Jan Lindström (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Linux, Windows |
||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Sprint: | 10.0.24 | ||||||||||||||||||||||||||||
| Description |
|
Somewhere between MariaDB 10.0.12 and MariaDB 10.0.21 the behavior of ALTER TABLE changed. We have one special ALTER TABLE statement that worked until version 10.0.12 (and maybe later) but stopped to work at version 10.0.21 (maybe earlier). We tried version 10.1.10 as well, which still produces the error. How to reproduce: First create a table like this:
Next do an ALTER table like this:
The message is 'Incorrect key file for table 'w_findispmon05u'; try to repair it'. If the ALTER table is split into two statements as follows, the error disappears.
We see this behavior with different operating systems (Windows 7 64Bit, various Linux variants), so we think that this does not matter. To test it with the version 10.1.10, we just used the MSI installer for Windows 64 Bit with all default settings. The error can be reproduced this way. |
| Comments |
| Comment by Elena Stepanova [ 2016-01-26 ] | |||||||||||||
|
Thanks for the report and the test case. The problem appeared in 10.0 tree (10.0.18 release) with the following revision:
| |||||||||||||
| Comment by Jeremy Cole [ 2016-02-12 ] | |||||||||||||
|
Note that | |||||||||||||
| Comment by Jan Lindström (Inactive) [ 2016-02-15 ] | |||||||||||||
|
commit c0b6c27dbede85952b3e6cd04b6393267e1aa656 InnoDB needs to rebuild table if column name is changed and |