diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-05-18 14:04:31 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-05-18 14:04:31 +0300 |
commit | 5b6bcb59ac7791cf99caf683fb131b7be4b02341 (patch) | |
tree | a3a514f0e0857b3324bce16adb824acbb5234c7a | |
parent | f9d8571f383c820accbca662cc4f850f5d29c98c (diff) | |
download | mariadb-git-5b6bcb59ac7791cf99caf683fb131b7be4b02341.tar.gz |
MDEV-22611 Assertion btr_search_enabled failed during buffer pool resizing
In commit ad6171b91cac33e70bb28fa6865488b2c65e858c (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.
-rw-r--r-- | storage/innobase/btr/btr0sea.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/storage/innobase/btr/btr0sea.cc b/storage/innobase/btr/btr0sea.cc index f1075358ad2..76aabf287c0 100644 --- a/storage/innobase/btr/btr0sea.cc +++ b/storage/innobase/btr/btr0sea.cc @@ -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)) { |