summaryrefslogtreecommitdiff
path: root/storage/innobase/btr/btr0cur.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/btr/btr0cur.cc')
-rw-r--r--storage/innobase/btr/btr0cur.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/storage/innobase/btr/btr0cur.cc b/storage/innobase/btr/btr0cur.cc
index b9681040092..dda6a95da16 100644
--- a/storage/innobase/btr/btr0cur.cc
+++ b/storage/innobase/btr/btr0cur.cc
@@ -1016,9 +1016,10 @@ dberr_t btr_cur_t::search_leaf(const dtuple_t *tuple, page_cur_mode_t mode,
# ifdef UNIV_SEARCH_PERF_STAT
info->n_searches++;
# endif
+ bool ahi_enabled= btr_search_enabled && !index()->is_ibuf();
/* We do a dirty read of btr_search_enabled below,
and btr_search_guess_on_hash() will have to check it again. */
- if (!btr_search_enabled);
+ if (!ahi_enabled);
else if (btr_search_guess_on_hash(index(), info, tuple, mode,
latch_mode, this, mtr))
{
@@ -1350,7 +1351,7 @@ release_tree:
reached_latched_leaf:
#ifdef BTR_CUR_HASH_ADAPT
- if (btr_search_enabled && !(tuple->info_bits & REC_INFO_MIN_REC_FLAG))
+ if (ahi_enabled && !(tuple->info_bits & REC_INFO_MIN_REC_FLAG))
{
if (page_cur_search_with_match_bytes(tuple, mode,
&up_match, &up_bytes,
@@ -5955,7 +5956,6 @@ btr_store_big_rec_extern_fields(
byte* field_ref;
ulint extern_len;
ulint store_len;
- ulint space_id;
ulint i;
mtr_t mtr;
mem_heap_t* heap = NULL;
@@ -5984,7 +5984,6 @@ btr_store_big_rec_extern_fields(
btr_blob_log_check_t redo_log(pcur, btr_mtr, offsets, &rec_block,
&rec, op);
page_zip = buf_block_get_page_zip(rec_block);
- space_id = rec_block->page.id().space();
if (page_zip) {
int err;
@@ -6112,6 +6111,7 @@ alloc_fail:
goto alloc_fail;
}
+ const uint32_t space_id = block->page.id().space();
const uint32_t page_no = block->page.id().page_no();
if (prev_page_no == FIL_NULL) {