[MDEV-23295] Assertion `fields[i].same(instant.fields[i])' failed in dict_index_t::instant_add_field #2 Created: 2020-07-26 Updated: 2022-06-27 Resolved: 2020-07-27 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.4, 10.5 |
| Fix Version/s: | 10.4.14, 10.5.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Description |
|
The fix for
Not reproducible on 10.3. |
| Comments |
| Comment by Marko Mäkelä [ 2020-07-27 ] | |||||||||
|
The problem seems to be that the dummy table object instant.table was created in ROW_FORMAT=REDUNDANT instead of the current ROW_FORMAT of the table. There are two possible fixes:
This bug demonstrates how problematic it is to introduce global parameters that affect DDL operations. We also face the challenge that the global parameter could be modified between the time we checked it in ha_innobase::check_if_supported_inplace_alter() and again in prepare_inplace_alter_table_dict(). We might first confirm that an ALGORITHM=INSTANT operation is possible, but then find out that the ROW_FORMAT change actually requires that the table be rebuilt. | |||||||||
| Comment by Marko Mäkelä [ 2020-07-27 ] | |||||||||
|
It would be consistent with the | |||||||||
| Comment by Marko Mäkelä [ 2020-07-27 ] | |||||||||
|
In dict_table_t::prepare_instant() we definitely do not support changing the ROW_FORMAT between REDUNDANT and DYNAMIC or COMPACT. Some assertions will be needed. I think that it is most consistent to remember the return value of handler::check_if_supported_inplace_alter() and to preserve the ROW_FORMAT in ha_innobase::prepare_inplace_alter_table() if ALGORITHM=INSTANT had been promised. I used the following test case to test my fix. It is returning the correct ROW_FORMAT for all 3 combinations in 10.3:
If I omit my actual fix, the 2 added assertions in dict_table_t::prepare_instant() would fail. | |||||||||
| Comment by Nikita Malyavin [ 2020-07-27 ] | |||||||||
|
the sql-side changes are fine, now it's Thiru's turn |