summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThirunarayanan Balathandayuthapani <thiru@mariadb.com>2020-07-30 13:38:43 +0530
committerThirunarayanan Balathandayuthapani <thiru@mariadb.com>2020-07-30 13:59:03 +0530
commit8a612314d0c9bc5b1db6f3998f26c28967915949 (patch)
tree4b9cc0ec71d6a9b7babab496a2c85b1441ba1f07
parentc5d4dd253348655a663d37985a3e61b20d17ed20 (diff)
downloadmariadb-git-8a612314d0c9bc5b1db6f3998f26c28967915949.tar.gz
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.
-rw-r--r--storage/innobase/btr/btr0sea.cc20
1 files changed, 0 insertions, 20 deletions
diff --git a/storage/innobase/btr/btr0sea.cc b/storage/innobase/btr/btr0sea.cc
index 491a3e375d3..ea34b4034e4 100644
--- a/storage/innobase/btr/btr0sea.cc
+++ b/storage/innobase/btr/btr0sea.cc
@@ -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;