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.cc36
1 files changed, 9 insertions, 27 deletions
diff --git a/storage/innobase/btr/btr0cur.cc b/storage/innobase/btr/btr0cur.cc
index cfff322f547..7e5a6912c1e 100644
--- a/storage/innobase/btr/btr0cur.cc
+++ b/storage/innobase/btr/btr0cur.cc
@@ -807,7 +807,7 @@ btr_cur_optimistic_latch_leaves(
page_id_t(cursor->index->table->space_id,
left_page_no),
cursor->index->table->space->zip_size(),
- mode, nullptr, BUF_GET_POSSIBLY_FREED,
+ mode, BUF_GET_POSSIBLY_FREED,
__FILE__, __LINE__, mtr, &err);
if (!cursor->left_block) {
@@ -1264,7 +1264,6 @@ btr_cur_search_to_nth_level_func(
{
page_t* page = NULL; /* remove warning */
buf_block_t* block;
- buf_block_t* guess;
ulint height;
ulint up_match;
ulint up_bytes;
@@ -1302,9 +1301,6 @@ btr_cur_search_to_nth_level_func(
DBUG_ENTER("btr_cur_search_to_nth_level");
-#ifdef BTR_CUR_ADAPT
- btr_search_t* info;
-#endif /* BTR_CUR_ADAPT */
mem_heap_t* heap = NULL;
rec_offs offsets_[REC_OFFS_NORMAL_SIZE];
rec_offs* offsets = offsets_;
@@ -1402,13 +1398,8 @@ btr_cur_search_to_nth_level_func(
cursor->flag = BTR_CUR_BINARY;
cursor->index = index;
-#ifndef BTR_CUR_ADAPT
- guess = NULL;
-#else
- info = btr_search_get_info(index);
- guess = info->root_guess;
-
#ifdef BTR_CUR_HASH_ADAPT
+ btr_search_t* info = btr_search_get_info(index);
# ifdef UNIV_SEARCH_PERF_STAT
info->n_searches++;
@@ -1446,14 +1437,12 @@ btr_cur_search_to_nth_level_func(
DBUG_RETURN(err);
}
-# endif /* BTR_CUR_HASH_ADAPT */
-#endif /* BTR_CUR_ADAPT */
+
btr_cur_n_non_sea++;
/* If the hash search did not succeed, do binary search down the
tree */
-#ifdef BTR_CUR_HASH_ADAPT
if (ahi_latch) {
/* Release possible search latch to obey latching order */
rw_lock_s_unlock(ahi_latch);
@@ -1613,7 +1602,7 @@ search_loop:
retry_page_get:
ut_ad(n_blocks < BTR_MAX_LEVELS);
tree_savepoints[n_blocks] = mtr_set_savepoint(mtr);
- block = buf_page_get_gen(page_id, zip_size, rw_latch, guess,
+ block = buf_page_get_gen(page_id, zip_size, rw_latch,
buf_mode, file, line, mtr, &err,
height == 0 && !index->is_clust());
tree_blocks[n_blocks] = block;
@@ -1729,7 +1718,7 @@ retry_page_get:
= mtr_set_savepoint(mtr);
get_block = buf_page_get_gen(
page_id_t(page_id.space(), left_page_no),
- zip_size, rw_latch, NULL, buf_mode,
+ zip_size, rw_latch, buf_mode,
file, line, mtr, &err);
prev_tree_blocks[prev_n_blocks] = get_block;
prev_n_blocks++;
@@ -1760,7 +1749,7 @@ retry_page_get:
tree_savepoints[n_blocks] = mtr_set_savepoint(mtr);
block = buf_page_get_gen(page_id, zip_size,
- rw_latch, NULL, buf_mode,
+ rw_latch, buf_mode,
file, line, mtr, &err);
tree_blocks[n_blocks] = block;
@@ -1838,10 +1827,6 @@ retry_page_get:
cursor->rtr_info->thr = cursor->thr;
rtr_get_mbr_from_tuple(tuple, &cursor->rtr_info->mbr);
}
-
-#ifdef BTR_CUR_ADAPT
- info->root_guess = block;
-#endif
}
if (height == 0) {
@@ -2038,7 +2023,6 @@ retry_page_get:
ut_ad(height > 0);
height--;
- guess = NULL;
node_ptr = page_cur_get_rec(page_cursor);
@@ -2381,8 +2365,6 @@ need_opposite_intention:
/* btr_insert_into_right_sibling() might cause
deleting node_ptr at upper level */
- guess = NULL;
-
if (height == 0) {
/* release the leaf pages if latched */
for (uint i = 0; i < 3; i++) {
@@ -2638,7 +2620,7 @@ btr_cur_open_at_index_side_func(
&& (latch_mode != BTR_MODIFY_TREE || height == level)
? upper_rw_latch : RW_NO_LATCH;
buf_block_t* block = buf_page_get_gen(page_id, zip_size,
- rw_latch, NULL, BUF_GET,
+ rw_latch, BUF_GET,
file, line, mtr, &err,
height == 0
&& !index->is_clust());
@@ -2979,7 +2961,7 @@ btr_cur_open_at_rnd_pos_func(
&& latch_mode != BTR_MODIFY_TREE
? upper_rw_latch : RW_NO_LATCH;
buf_block_t* block = buf_page_get_gen(page_id, zip_size,
- rw_latch, NULL, BUF_GET,
+ rw_latch, BUF_GET,
file, line, mtr, &err,
height == 0
&& !index->is_clust());
@@ -6076,7 +6058,7 @@ btr_estimate_n_rows_in_range_on_level(
the B-tree. We pass BUF_GET_POSSIBLY_FREED in order to
silence a debug assertion about this. */
block = buf_page_get_gen(page_id, zip_size, RW_S_LATCH,
- NULL, BUF_GET_POSSIBLY_FREED,
+ BUF_GET_POSSIBLY_FREED,
__FILE__, __LINE__, &mtr, &err);
ut_ad((block != NULL) == (err == DB_SUCCESS));