Skip to content

Commit 31d97c3

Browse files
committed
MDEV-20203 assert_block_ahi_valid() fails in btr_search_update_hash_ref()
btr_search_update_hash_ref(): Check the consistency of block->index and block->n_pointers only while holding the partition latch. Reviewed by: Thirunarayanan Balathandayuthapani Tested by: Saahil Alam
1 parent 4b5969b commit 31d97c3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

storage/innobase/btr/btr0sea.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,6 @@ btr_search_update_hash_ref(
687687
ut_ad(block->page.lock.have_x() || block->page.lock.have_s());
688688
ut_ad(btr_cur_get_page(cursor) == block->page.frame);
689689
ut_ad(page_is_leaf(block->page.frame));
690-
assert_block_ahi_valid(block);
691690

692691
dict_index_t* index = block->index;
693692

@@ -706,8 +705,9 @@ btr_search_update_hash_ref(
706705
ut_ad(!dict_index_is_ibuf(index));
707706
auto part = btr_search_sys.get_part(*index);
708707
part->latch.wr_lock(SRW_LOCK_CALL);
709-
ut_ad(!block->index || block->index == index);
710-
708+
#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
709+
ut_a(block->index ? block->index == index : !block->n_pointers);
710+
#endif
711711
if (block->index
712712
&& (block->curr_n_fields == info->n_fields)
713713
&& (block->curr_n_bytes == info->n_bytes)

0 commit comments

Comments
 (0)