summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-01-16 13:55:45 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2018-01-16 13:55:45 +0200
commit33ecf8345d357cbf71bde2b03b641a612db7781f (patch)
tree320a26d972623d9b796f868c88a05fadadf29481 /storage
parentf5e158183cb72de5bfc1cc7a9b6864a85c6517fd (diff)
downloadmariadb-git-33ecf8345d357cbf71bde2b03b641a612db7781f.tar.gz
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.
Diffstat (limited to 'storage')
-rw-r--r--storage/innobase/btr/btr0cur.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/innobase/btr/btr0cur.cc b/storage/innobase/btr/btr0cur.cc
index 8146667f7c2..139e06ab996 100644
--- a/storage/innobase/btr/btr0cur.cc
+++ b/storage/innobase/btr/btr0cur.cc
@@ -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