Skip to content

Commit

Permalink
Follow-up fix to MDEV-14441: Fix a potential race condition
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dr-m committed Jan 16, 2018
1 parent f5e1581 commit 33ecf83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion storage/innobase/btr/btr0cur.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3694,7 +3694,7 @@ btr_cur_update_in_place(
#ifdef BTR_CUR_HASH_ADAPT
{
rw_lock_t* ahi_latch = block->index
? btr_get_search_latch(block->index) : NULL;
? btr_get_search_latch(index) : NULL;
if (ahi_latch) {
/* TO DO: Can we skip this if none of the fields
index->search_info->curr_n_fields
Expand Down

0 comments on commit 33ecf83

Please sign in to comment.