Skip to content

Commit

Permalink
MDEV-32068 merge fixup
Browse files Browse the repository at this point in the history
btr_pcur_move_to_next_page(): Add code that was wrongly deleted in
the merge commit 8c8bce0
  • Loading branch information
dr-m committed Dec 20, 2023
1 parent 8c8bce0 commit 7e03489
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion storage/innobase/btr/btr0pcur.cc
Expand Up @@ -536,10 +536,11 @@ btr_pcur_move_to_next_page(
}

dberr_t err;
bool first_access = false;
buf_block_t* next_block = btr_block_get(
*cursor->index(), next_page_no,
rw_lock_type_t(cursor->latch_mode & (RW_X_LATCH | RW_S_LATCH)),
mtr, &err);
mtr, &err, &first_access);

if (UNIV_UNLIKELY(!next_block)) {
return err;
Expand All @@ -558,6 +559,10 @@ btr_pcur_move_to_next_page(

const auto s = mtr->get_savepoint();
mtr->rollback_to_savepoint(s - 2, s - 1);
if (first_access) {
buf_read_ahead_linear(next_block->page.id(),
next_block->zip_size());
}
return DB_SUCCESS;
}

Expand Down

0 comments on commit 7e03489

Please sign in to comment.