Commit 5b6bcb59 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-22611 Assertion btr_search_enabled failed during buffer pool resizing

In commit ad6171b9 (MDEV-22456)
we removed the acquisition of the adaptive hash index latch
from the caller of btr_search_update_hash_ref().
The tests innodb.innodb_buffer_pool_resize_with_chunks
and innodb.innodb_buffer_pool_resize
would occasionally fail starting with 10.3,
due to MDEV-12288 causing more purge activity during the test.

btr_search_update_hash_ref(): After acquiring the adaptive hash index
latch, check that the adaptive hash index is still enabled on the page.
parent f9d8571f
......@@ -648,7 +648,7 @@ btr_search_update_hash_ref(
dict_index_t* index = block->index;
if (!index) {
if (!index || !info->n_hash_potential) {
return;
}
......@@ -657,8 +657,9 @@ btr_search_update_hash_ref(
ut_ad(!dict_index_is_ibuf(index));
rw_lock_t* const latch = btr_get_search_latch(index);
rw_lock_x_lock(latch);
ut_ad(!block->index || block->index == index);
if ((info->n_hash_potential > 0)
if (block->index
&& (block->curr_n_fields == info->n_fields)
&& (block->curr_n_bytes == info->n_bytes)
&& (block->curr_left_side == info->left_side)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment