[MDEV-17831] Assertion `supports_instant()' failed in dict_table_t::prepare_instant upon ADD COLUMN on table with KEY_BLOCK_SIZE Created: 2018-11-25 Updated: 2020-07-27 Resolved: 2018-11-26 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.3.10, 10.4.0, 10.2.19 |
| Fix Version/s: | 10.4.1, 10.2.20, 10.3.12 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
|
| Comments |
| Comment by Marko Mäkelä [ 2018-11-26 ] | ||||||||||||
|
In 10.3, there is no failure and the ALTER TABLE will be instantaneous, although it should not be. The reason for this 10.3 surprise is that TRUNCATE TABLE will convert the table from (implied) ROW_FORMAT=COMPRESSED to the default ROW_FORMAT=DYNAMIC. This can be verified by adding SHOW TABLE STATUS statements. | ||||||||||||
| Comment by Marko Mäkelä [ 2018-11-26 ] | ||||||||||||
|
On 10.2, TRUNCATE TABLE will change the ROW_FORMAT to uncompressed, but the ALTER TABLE will restore back to ROW_FORMAT=COMPRESSED. | ||||||||||||
| Comment by Marko Mäkelä [ 2018-11-26 ] | ||||||||||||
|
This fixes it:
In 10.4 the assertion failure would be masked by this change. The problem from the InnoDB point of view is that the ALTER TABLE is modifying ROW_FORMAT without setting ALTER_OPTIONS. This was because the two dictionaries got out of sync. I think that we should remove that assertion, and let the operation go through, without changing the ROW_FORMAT of the InnoDB table. | ||||||||||||
| Comment by Marko Mäkelä [ 2018-11-26 ] | ||||||||||||
|
TRUNCATE will correctly preserve the KEY_BLOCK_SIZE from 10.2.20 on. |