MDEV-23332 Index online status assert failure in btr_search_drop_page_hash_index
Problem: ======== In row_merge_drop_indexes(), InnoDB drops only the index from dictionary and frees the index pages but it maintains the index object if the table is being used by other DML threads. It sets the online status of the index to ONLINE_INDEX_ABORTED_DROPPED. Removing the index from dictionary doesn't remove the corressponding ahi entries of the index. When block is being reused, InnoDB tries to remove ahi entries for the block and it fails if index online status is ONLINE_INDEX_ABORTED_DROPPED. Fix: ==== MDEV-22456 allows the index ahi entries to be dropped lazily. so checking online status in btr_search_drop_page_hash_index() is meaningless and should be removed.
This commit is contained in:
parent
c5d4dd2533
commit
8a612314d0
@ -1160,26 +1160,6 @@ retry:
|
||||
|| block->page.id.space() == index->space);
|
||||
ut_a(index_id == index->id);
|
||||
ut_ad(!dict_index_is_ibuf(index));
|
||||
#ifdef UNIV_DEBUG
|
||||
switch (dict_index_get_online_status(index)) {
|
||||
case ONLINE_INDEX_CREATION:
|
||||
/* The index is being created (bulk loaded). */
|
||||
case ONLINE_INDEX_COMPLETE:
|
||||
/* The index has been published. */
|
||||
case ONLINE_INDEX_ABORTED:
|
||||
/* Either the index creation was aborted due to an
|
||||
error observed by InnoDB (in which case there should
|
||||
not be any adaptive hash index entries), or it was
|
||||
completed and then flagged aborted in
|
||||
rollback_inplace_alter_table(). */
|
||||
break;
|
||||
case ONLINE_INDEX_ABORTED_DROPPED:
|
||||
/* The index should have been dropped from the tablespace
|
||||
already, and the adaptive hash index entries should have
|
||||
been dropped as well. */
|
||||
ut_error;
|
||||
}
|
||||
#endif /* UNIV_DEBUG */
|
||||
|
||||
n_fields = block->curr_n_fields;
|
||||
n_bytes = block->curr_n_bytes;
|
||||
|
Loading…
x
Reference in New Issue
Block a user