Skip to content

Commit de4a00d

Browse files
committed
Merge 5.5 into 10.0
2 parents 19d21b9 + 028d253 commit de4a00d

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

storage/innobase/btr/btr0cur.cc

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3340,7 +3340,6 @@ btr_cur_pessimistic_delete(
33403340
ulint n_reserved = 0;
33413341
ibool success;
33423342
ibool ret = FALSE;
3343-
ulint level;
33443343
mem_heap_t* heap;
33453344
ulint* offsets;
33463345

@@ -3391,6 +3390,10 @@ btr_cur_pessimistic_delete(
33913390
#endif /* UNIV_ZIP_DEBUG */
33923391
}
33933392

3393+
if (flags == 0) {
3394+
lock_update_delete(block, rec);
3395+
}
3396+
33943397
if (UNIV_UNLIKELY(page_get_n_recs(page) < 2)
33953398
&& UNIV_UNLIKELY(dict_index_get_page(index)
33963399
!= buf_block_get_page_no(block))) {
@@ -3405,13 +3408,7 @@ btr_cur_pessimistic_delete(
34053408
goto return_after_reservations;
34063409
}
34073410

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)
34153412
&& UNIV_UNLIKELY(rec == page_rec_get_next(
34163413
page_get_infimum_rec(page)))) {
34173414

@@ -3434,6 +3431,7 @@ btr_cur_pessimistic_delete(
34343431
on a page, we have to change the father node pointer
34353432
so that it is equal to the new leftmost node pointer
34363433
on the page */
3434+
ulint level = btr_page_get_level(page, mtr);
34373435

34383436
btr_node_ptr_delete(index, block, mtr);
34393437

storage/xtradb/btr/btr0cur.cc

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3537,7 +3537,6 @@ btr_cur_pessimistic_delete(
35373537
ulint n_reserved = 0;
35383538
ibool success;
35393539
ibool ret = FALSE;
3540-
ulint level;
35413540
mem_heap_t* heap;
35423541
ulint* offsets;
35433542

@@ -3590,6 +3589,10 @@ btr_cur_pessimistic_delete(
35903589
#endif /* UNIV_ZIP_DEBUG */
35913590
}
35923591

3592+
if (flags == 0) {
3593+
lock_update_delete(block, rec);
3594+
}
3595+
35933596
if (UNIV_UNLIKELY(page_get_n_recs(page) < 2)
35943597
&& UNIV_UNLIKELY(dict_index_get_page(index)
35953598
!= buf_block_get_page_no(block))) {
@@ -3604,13 +3607,7 @@ btr_cur_pessimistic_delete(
36043607
goto return_after_reservations;
36053608
}
36063609

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)
36143611
&& UNIV_UNLIKELY(rec == page_rec_get_next(
36153612
page_get_infimum_rec(page)))) {
36163613

@@ -3633,6 +3630,7 @@ btr_cur_pessimistic_delete(
36333630
on a page, we have to change the father node pointer
36343631
so that it is equal to the new leftmost node pointer
36353632
on the page */
3633+
ulint level = btr_page_get_level(page, mtr);
36363634

36373635
btr_node_ptr_delete(index, block, mtr);
36383636

0 commit comments

Comments
 (0)