Commit 33ecf834 authored by Marko Mäkelä's avatar Marko Mäkelä

Follow-up fix to MDEV-14441: Fix a potential race condition

btr_cur_update_in_place(): Read block->index only once,
so that it cannot change to NULL after the first read.
When block->index != NULL, it must be equal to index.
parent f5e15818
...@@ -3694,7 +3694,7 @@ btr_cur_update_in_place( ...@@ -3694,7 +3694,7 @@ btr_cur_update_in_place(
#ifdef BTR_CUR_HASH_ADAPT #ifdef BTR_CUR_HASH_ADAPT
{ {
rw_lock_t* ahi_latch = block->index rw_lock_t* ahi_latch = block->index
? btr_get_search_latch(block->index) : NULL; ? btr_get_search_latch(index) : NULL;
if (ahi_latch) { if (ahi_latch) {
/* TO DO: Can we skip this if none of the fields /* TO DO: Can we skip this if none of the fields
index->search_info->curr_n_fields index->search_info->curr_n_fields
......
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