summaryrefslogtreecommitdiff
path: root/storage/innobase/btr/btr0sea.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/btr/btr0sea.cc')
-rw-r--r--storage/innobase/btr/btr0sea.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/storage/innobase/btr/btr0sea.cc b/storage/innobase/btr/btr0sea.cc
index d9736ebf747..561d463ec5e 100644
--- a/storage/innobase/btr/btr0sea.cc
+++ b/storage/innobase/btr/btr0sea.cc
@@ -1775,7 +1775,6 @@ func_exit:
void
btr_search_update_hash_on_insert(btr_cur_t* cursor, rw_lock_t* ahi_latch)
{
- hash_table_t* table;
buf_block_t* block;
dict_index_t* index;
const rec_t* rec;
@@ -1844,6 +1843,7 @@ btr_search_update_hash_on_insert(btr_cur_t* cursor, rw_lock_t* ahi_latch)
n_bytes, index->id);
}
+ hash_table_t* const table = btr_get_search_table(index);
bool locked = false;
if (!page_rec_is_infimum(rec) && !rec_is_metadata(rec, index)) {
@@ -1860,7 +1860,6 @@ btr_search_update_hash_on_insert(btr_cur_t* cursor, rw_lock_t* ahi_latch)
goto function_exit;
}
- table = btr_get_search_table(index);
ha_insert_for_fold(table, ins_fold, block, ins_rec);
}
@@ -1876,7 +1875,6 @@ btr_search_update_hash_on_insert(btr_cur_t* cursor, rw_lock_t* ahi_latch)
if (!btr_search_enabled || !block->index) {
goto function_exit;
}
- table = btr_get_search_table(index);
}
if (!left_side) {
@@ -1897,7 +1895,6 @@ check_next_rec:
if (!btr_search_enabled || !block->index) {
goto function_exit;
}
- table = btr_get_search_table(index);
}
ha_insert_for_fold(table, ins_fold, block, ins_rec);
@@ -1914,7 +1911,6 @@ check_next_rec:
if (!btr_search_enabled || !block->index) {
goto function_exit;
}
- table = btr_get_search_table(index);
}
if (!left_side) {