Skip to content

Commit e72e3cd

Browse files
committed
IB: redundant btr_pcur_move_to_prev_page() removed
1 parent ecc6cd9 commit e72e3cd

File tree

2 files changed

+0
-71
lines changed

2 files changed

+0
-71
lines changed

storage/innobase/btr/btr0pcur.cc

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -452,66 +452,6 @@ btr_pcur_move_to_next_page(
452452
ut_d(page_check_dir(next_page));
453453
}
454454

455-
/*********************************************************//**
456-
Moves the persistent cursor to the last record on the previous page. Releases the
457-
latch on the current page, and bufferunfixes it. Note that there must not be
458-
modifications on the current page, as then the x-latch can be released only in
459-
mtr_commit. */
460-
UNIV_INTERN
461-
void
462-
btr_pcur_move_to_prev_page(
463-
/*=======================*/
464-
btr_pcur_t* cursor, /*!< in: persistent cursor; must be on the
465-
last record of the current page */
466-
mtr_t* mtr) /*!< in: mtr */
467-
{
468-
ulint prev_page_no;
469-
page_t* page;
470-
buf_block_t* prev_block;
471-
page_t* prev_page;
472-
ulint mode;
473-
474-
ut_ad(cursor->pos_state == BTR_PCUR_IS_POSITIONED);
475-
ut_ad(cursor->latch_mode != BTR_NO_LATCHES);
476-
ut_ad(btr_pcur_is_before_first_on_page(cursor));
477-
478-
cursor->old_stored = false;
479-
480-
page = btr_pcur_get_page(cursor);
481-
prev_page_no = btr_page_get_prev(page, mtr);
482-
483-
ut_ad(prev_page_no != FIL_NULL);
484-
485-
mode = cursor->latch_mode;
486-
switch (mode) {
487-
case BTR_SEARCH_TREE:
488-
mode = BTR_SEARCH_LEAF;
489-
break;
490-
case BTR_MODIFY_TREE:
491-
mode = BTR_MODIFY_LEAF;
492-
}
493-
494-
buf_block_t* block = btr_pcur_get_block(cursor);
495-
496-
prev_block = btr_block_get(
497-
page_id_t(block->page.id.space(), prev_page_no),
498-
block->page.size, mode,
499-
btr_pcur_get_btr_cur(cursor)->index, mtr);
500-
501-
prev_page = buf_block_get_frame(prev_block);
502-
#ifdef UNIV_BTR_DEBUG
503-
ut_a(page_is_comp(prev_page) == page_is_comp(page));
504-
ut_a(btr_page_get_next(prev_page, mtr)
505-
== btr_pcur_get_block(cursor)->page.id.page_no());
506-
#endif /* UNIV_BTR_DEBUG */
507-
508-
btr_leaf_page_release(btr_pcur_get_block(cursor), mode, mtr);
509-
510-
page_cur_set_after_last(prev_block, btr_pcur_get_page_cur(cursor));
511-
512-
ut_d(page_check_dir(prev_page));
513-
}
514-
515455
/*********************************************************//**
516456
Moves the persistent cursor backward if it is on the first record of the page.
517457
Commits mtr. Note that to prevent a possible deadlock, the operation

storage/innobase/include/btr0pcur.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -359,17 +359,6 @@ btr_pcur_move_to_next_page(
359359
last record of the current page */
360360
mtr_t* mtr); /*!< in: mtr */
361361
/*********************************************************//**
362-
Moves the persistent cursor to the last record on the previous page.
363-
Releases the latch on the current page, and bufferunfixes it.
364-
Note that there must not be modifications on the current page,
365-
as then the x-latch can be released only in mtr_commit. */
366-
void
367-
btr_pcur_move_to_prev_page(
368-
/*=======================*/
369-
btr_pcur_t* cursor, /*!< in: persistent cursor; must be on the
370-
last record of the current page */
371-
mtr_t* mtr); /*!< in: mtr */
372-
/*********************************************************//**
373362
Moves the persistent cursor backward if it is on the first record
374363
of the page. Releases the latch on the current page, and bufferunfixes
375364
it. Note that to prevent a possible deadlock, the operation first

0 commit comments

Comments
 (0)