@@ -2480,8 +2480,8 @@ btr_attach_half_pages(
2480
2480
}
2481
2481
2482
2482
/* Get the previous and next pages of page */
2483
- prev_page_no = btr_page_get_prev (page, mtr );
2484
- next_page_no = btr_page_get_next (page, mtr );
2483
+ prev_page_no = btr_page_get_prev (page);
2484
+ next_page_no = btr_page_get_next (page);
2485
2485
2486
2486
const ulint space = block->page .id .space ();
2487
2487
@@ -2522,7 +2522,7 @@ btr_attach_half_pages(
2522
2522
if (prev_block) {
2523
2523
#ifdef UNIV_BTR_DEBUG
2524
2524
ut_a (page_is_comp (prev_block->frame ) == page_is_comp (page));
2525
- ut_a (btr_page_get_next (prev_block->frame , mtr )
2525
+ ut_a (btr_page_get_next (prev_block->frame )
2526
2526
== block->page .id .page_no ());
2527
2527
#endif /* UNIV_BTR_DEBUG */
2528
2528
@@ -2534,7 +2534,7 @@ btr_attach_half_pages(
2534
2534
if (next_block) {
2535
2535
#ifdef UNIV_BTR_DEBUG
2536
2536
ut_a (page_is_comp (next_block->frame ) == page_is_comp (page));
2537
- ut_a (btr_page_get_prev (next_block->frame , mtr )
2537
+ ut_a (btr_page_get_prev (next_block->frame )
2538
2538
== page_get_page_no (page));
2539
2539
#endif /* UNIV_BTR_DEBUG */
2540
2540
@@ -2548,7 +2548,7 @@ btr_attach_half_pages(
2548
2548
btr_page_set_prev (lower_page, lower_page_zip,
2549
2549
prev_page_no, mtr);
2550
2550
} else {
2551
- ut_ad (btr_page_get_prev (lower_page, mtr ) == prev_page_no);
2551
+ ut_ad (btr_page_get_prev (lower_page) == prev_page_no);
2552
2552
}
2553
2553
2554
2554
btr_page_set_next (lower_page, lower_page_zip, upper_page_no, mtr);
@@ -2559,7 +2559,7 @@ btr_attach_half_pages(
2559
2559
btr_page_set_next (upper_page, upper_page_zip,
2560
2560
next_page_no, mtr);
2561
2561
} else {
2562
- ut_ad (btr_page_get_next (upper_page, mtr ) == next_page_no);
2562
+ ut_ad (btr_page_get_next (upper_page) == next_page_no);
2563
2563
}
2564
2564
}
2565
2565
@@ -2620,7 +2620,7 @@ btr_insert_into_right_sibling(
2620
2620
{
2621
2621
buf_block_t * block = btr_cur_get_block (cursor);
2622
2622
page_t * page = buf_block_get_frame (block);
2623
- ulint next_page_no = btr_page_get_next (page, mtr );
2623
+ const uint32_t next_page_no = btr_page_get_next (page);
2624
2624
2625
2625
ut_ad (mtr_memo_contains_flagged (
2626
2626
mtr, dict_index_get_lock (cursor->index ),
@@ -3161,8 +3161,8 @@ btr_level_list_remove_func(
3161
3161
ut_ad (space == page_get_space_id (page));
3162
3162
/* Get the previous and next page numbers of page */
3163
3163
3164
- const ulint prev_page_no = btr_page_get_prev (page, mtr );
3165
- const ulint next_page_no = btr_page_get_next (page, mtr );
3164
+ const uint32_t prev_page_no = btr_page_get_prev (page);
3165
+ const uint32_t next_page_no = btr_page_get_next (page);
3166
3166
3167
3167
/* Update page links of the level */
3168
3168
@@ -3175,8 +3175,8 @@ btr_level_list_remove_func(
3175
3175
= buf_block_get_frame (prev_block);
3176
3176
#ifdef UNIV_BTR_DEBUG
3177
3177
ut_a (page_is_comp (prev_page) == page_is_comp (page));
3178
- ut_a (btr_page_get_next (prev_page, mtr)
3179
- == page_get_page_no (page ));
3178
+ ut_a (! memcmp (prev_page + FIL_PAGE_NEXT, page + FIL_PAGE_OFFSET,
3179
+ 4 ));
3180
3180
#endif /* UNIV_BTR_DEBUG */
3181
3181
3182
3182
btr_page_set_next (prev_page,
@@ -3194,8 +3194,8 @@ btr_level_list_remove_func(
3194
3194
= buf_block_get_frame (next_block);
3195
3195
#ifdef UNIV_BTR_DEBUG
3196
3196
ut_a (page_is_comp (next_page) == page_is_comp (page));
3197
- ut_a (btr_page_get_prev (next_page, mtr)
3198
- == page_get_page_no (page ));
3197
+ ut_a (! memcmp (next_page + FIL_PAGE_PREV, page + FIL_PAGE_OFFSET,
3198
+ 4 ));
3199
3199
#endif /* UNIV_BTR_DEBUG */
3200
3200
3201
3201
btr_page_set_prev (next_page,
@@ -3527,8 +3527,8 @@ btr_compress(
3527
3527
3528
3528
MONITOR_INC (MONITOR_INDEX_MERGE_ATTEMPTS);
3529
3529
3530
- left_page_no = btr_page_get_prev (page, mtr );
3531
- right_page_no = btr_page_get_next (page, mtr );
3530
+ left_page_no = btr_page_get_prev (page);
3531
+ right_page_no = btr_page_get_next (page);
3532
3532
3533
3533
#ifdef UNIV_DEBUG
3534
3534
if (!page_is_leaf (page) && left_page_no == FIL_NULL) {
@@ -3602,10 +3602,10 @@ btr_compress(
3602
3602
3603
3603
#ifdef UNIV_BTR_DEBUG
3604
3604
if (is_left) {
3605
- ut_a (btr_page_get_next (merge_page, mtr )
3605
+ ut_a (btr_page_get_next (merge_page)
3606
3606
== block->page .id .page_no ());
3607
3607
} else {
3608
- ut_a (btr_page_get_prev (merge_page, mtr )
3608
+ ut_a (btr_page_get_prev (merge_page)
3609
3609
== block->page .id .page_no ());
3610
3610
}
3611
3611
#endif /* UNIV_BTR_DEBUG */
@@ -4126,8 +4126,8 @@ btr_discard_page(
4126
4126
4127
4127
/* Decide the page which will inherit the locks */
4128
4128
4129
- left_page_no = btr_page_get_prev (buf_block_get_frame (block), mtr );
4130
- right_page_no = btr_page_get_next (buf_block_get_frame (block), mtr );
4129
+ left_page_no = btr_page_get_prev (buf_block_get_frame (block));
4130
+ right_page_no = btr_page_get_next (buf_block_get_frame (block));
4131
4131
4132
4132
const page_size_t page_size (dict_table_page_size (index->table ));
4133
4133
ut_d (bool parent_is_different = false );
@@ -4138,7 +4138,7 @@ btr_discard_page(
4138
4138
4139
4139
merge_page = buf_block_get_frame (merge_block);
4140
4140
#ifdef UNIV_BTR_DEBUG
4141
- ut_a (btr_page_get_next (merge_page, mtr )
4141
+ ut_a (btr_page_get_next (merge_page)
4142
4142
== block->page .id .page_no ());
4143
4143
#endif /* UNIV_BTR_DEBUG */
4144
4144
ut_d (parent_is_different =
@@ -4154,7 +4154,7 @@ btr_discard_page(
4154
4154
4155
4155
merge_page = buf_block_get_frame (merge_block);
4156
4156
#ifdef UNIV_BTR_DEBUG
4157
- ut_a (btr_page_get_prev (merge_page, mtr )
4157
+ ut_a (btr_page_get_prev (merge_page)
4158
4158
== block->page .id .page_no ());
4159
4159
#endif /* UNIV_BTR_DEBUG */
4160
4160
ut_d (parent_is_different = page_rec_is_supremum (
@@ -4776,7 +4776,7 @@ btr_validate_level(
4776
4776
does not use such scan for any of its DML or query
4777
4777
operations */
4778
4778
if (dict_index_is_spatial (index)) {
4779
- left_page_no = btr_page_get_prev (page, &mtr );
4779
+ left_page_no = btr_page_get_prev (page);
4780
4780
4781
4781
while (left_page_no != FIL_NULL) {
4782
4782
page_id_t left_page_id (
@@ -4793,7 +4793,7 @@ btr_validate_level(
4793
4793
table_page_size,
4794
4794
RW_SX_LATCH, index, &mtr);
4795
4795
page = buf_block_get_frame (block);
4796
- left_page_no = btr_page_get_prev (page, &mtr );
4796
+ left_page_no = btr_page_get_prev (page);
4797
4797
}
4798
4798
}
4799
4799
}
@@ -4848,8 +4848,8 @@ btr_validate_level(
4848
4848
4849
4849
ut_a (btr_page_get_level (page, &mtr) == level);
4850
4850
4851
- right_page_no = btr_page_get_next (page, &mtr );
4852
- left_page_no = btr_page_get_prev (page, &mtr );
4851
+ right_page_no = btr_page_get_next (page);
4852
+ left_page_no = btr_page_get_prev (page);
4853
4853
4854
4854
ut_a (!page_is_empty (page)
4855
4855
|| (level == 0
@@ -4866,9 +4866,7 @@ btr_validate_level(
4866
4866
4867
4867
right_page = buf_block_get_frame (right_block);
4868
4868
4869
- if (btr_page_get_prev (right_page, &mtr)
4870
- != page_get_page_no (page)) {
4871
-
4869
+ if (btr_page_get_prev (right_page) != page_get_page_no (page)) {
4872
4870
btr_validate_report2 (index, level, block, right_block);
4873
4871
fputs (" InnoDB: broken FIL_PAGE_NEXT"
4874
4872
" or FIL_PAGE_PREV links\n " , stderr);
@@ -4949,7 +4947,7 @@ btr_validate_level(
4949
4947
node_ptr = btr_cur_get_rec (&node_cur);
4950
4948
4951
4949
parent_page_no = page_get_page_no (father_page);
4952
- parent_right_page_no = btr_page_get_next (father_page, &mtr );
4950
+ parent_right_page_no = btr_page_get_next (father_page);
4953
4951
rightmost_child = page_rec_is_supremum (
4954
4952
page_rec_get_next (node_ptr));
4955
4953
@@ -5090,7 +5088,7 @@ btr_validate_level(
5090
5088
}
5091
5089
5092
5090
if (page_get_page_no (right_father_page)
5093
- != btr_page_get_next (father_page, &mtr )) {
5091
+ != btr_page_get_next (father_page)) {
5094
5092
5095
5093
ret = false ;
5096
5094
fputs (" InnoDB: node pointer 3 to"
0 commit comments