@@ -2994,6 +2994,15 @@ btr_insert_into_right_sibling(
2994
2994
return (rec);
2995
2995
}
2996
2996
/* lbh */
2997
+ /* function flow
2998
+ 0. get cur, left, right page info
2999
+ 1. choose the merge page(left/right) and check the position of the inserted record
3000
+ 2. choose how many records to move
3001
+ 3. move record list to the merge page
3002
+ 4. insert one record
3003
+ 5. update father node pointer
3004
+ 6. update bitmap
3005
+ */
2997
3006
2998
3007
/* @return inserted record */
2999
3008
static
@@ -3488,7 +3497,7 @@ btr_page_redistribute_before_split(
3488
3497
}
3489
3498
3490
3499
3491
- // 6. readjust father cursor of merge block and cur block
3500
+ // 6. readjust father cursor of merge block and cur block since the first record changed
3492
3501
ibool compressed;
3493
3502
dberr_t err;
3494
3503
level = btr_page_get_level (page, mtr);
@@ -3537,17 +3546,13 @@ btr_page_redistribute_before_split(
3537
3546
flags, cursor->index , level + 1 , node_ptr, mtr);
3538
3547
3539
3548
}
3540
- // logging
3549
+ // for debug mode: logging
3541
3550
ut_ad (btr_check_node_ptr (index , left_page_block, mtr));
3542
3551
ut_ad (btr_check_node_ptr (index , right_page_block, mtr));
3543
3552
ut_ad (btr_check_node_ptr (index , block, mtr));
3544
3553
3545
3554
3546
-
3547
-
3548
-
3549
3555
// 7. update insert buffer bitmap
3550
-
3551
3556
if (!dict_index_is_clust (cursor->index ) && page_is_leaf (merge_page)) {
3552
3557
/* Update the free bits of the B-tree page in the
3553
3558
insert buffer bitmap. This has to be done in a
0 commit comments