File tree Expand file tree Collapse file tree 2 files changed +12
-16
lines changed Expand file tree Collapse file tree 2 files changed +12
-16
lines changed Original file line number Diff line number Diff line change @@ -3340,7 +3340,6 @@ btr_cur_pessimistic_delete(
3340
3340
ulint n_reserved = 0 ;
3341
3341
ibool success;
3342
3342
ibool ret = FALSE ;
3343
- ulint level;
3344
3343
mem_heap_t * heap;
3345
3344
ulint* offsets;
3346
3345
@@ -3391,6 +3390,10 @@ btr_cur_pessimistic_delete(
3391
3390
#endif /* UNIV_ZIP_DEBUG */
3392
3391
}
3393
3392
3393
+ if (flags == 0 ) {
3394
+ lock_update_delete (block, rec);
3395
+ }
3396
+
3394
3397
if (UNIV_UNLIKELY (page_get_n_recs (page) < 2 )
3395
3398
&& UNIV_UNLIKELY (dict_index_get_page (index)
3396
3399
!= buf_block_get_page_no (block))) {
@@ -3405,13 +3408,7 @@ btr_cur_pessimistic_delete(
3405
3408
goto return_after_reservations;
3406
3409
}
3407
3410
3408
- if (flags == 0 ) {
3409
- lock_update_delete (block, rec);
3410
- }
3411
-
3412
- level = btr_page_get_level (page, mtr);
3413
-
3414
- if (level > 0
3411
+ if (!page_is_leaf (page)
3415
3412
&& UNIV_UNLIKELY (rec == page_rec_get_next (
3416
3413
page_get_infimum_rec (page)))) {
3417
3414
@@ -3434,6 +3431,7 @@ btr_cur_pessimistic_delete(
3434
3431
on a page, we have to change the father node pointer
3435
3432
so that it is equal to the new leftmost node pointer
3436
3433
on the page */
3434
+ ulint level = btr_page_get_level (page, mtr);
3437
3435
3438
3436
btr_node_ptr_delete (index, block, mtr);
3439
3437
Original file line number Diff line number Diff line change @@ -3537,7 +3537,6 @@ btr_cur_pessimistic_delete(
3537
3537
ulint n_reserved = 0 ;
3538
3538
ibool success;
3539
3539
ibool ret = FALSE ;
3540
- ulint level;
3541
3540
mem_heap_t * heap;
3542
3541
ulint* offsets;
3543
3542
@@ -3590,6 +3589,10 @@ btr_cur_pessimistic_delete(
3590
3589
#endif /* UNIV_ZIP_DEBUG */
3591
3590
}
3592
3591
3592
+ if (flags == 0 ) {
3593
+ lock_update_delete (block, rec);
3594
+ }
3595
+
3593
3596
if (UNIV_UNLIKELY (page_get_n_recs (page) < 2 )
3594
3597
&& UNIV_UNLIKELY (dict_index_get_page (index)
3595
3598
!= buf_block_get_page_no (block))) {
@@ -3604,13 +3607,7 @@ btr_cur_pessimistic_delete(
3604
3607
goto return_after_reservations;
3605
3608
}
3606
3609
3607
- if (flags == 0 ) {
3608
- lock_update_delete (block, rec);
3609
- }
3610
-
3611
- level = btr_page_get_level (page, mtr);
3612
-
3613
- if (level > 0
3610
+ if (!page_is_leaf (page)
3614
3611
&& UNIV_UNLIKELY (rec == page_rec_get_next (
3615
3612
page_get_infimum_rec (page)))) {
3616
3613
@@ -3633,6 +3630,7 @@ btr_cur_pessimistic_delete(
3633
3630
on a page, we have to change the father node pointer
3634
3631
so that it is equal to the new leftmost node pointer
3635
3632
on the page */
3633
+ ulint level = btr_page_get_level (page, mtr);
3636
3634
3637
3635
btr_node_ptr_delete (index, block, mtr);
3638
3636
You can’t perform that action at this time.
0 commit comments