Skip to content

Commit

Permalink
Merge 10.0 into 10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed Oct 2, 2017
2 parents b8488e5 + de4a00d commit ac0b5a2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
14 changes: 6 additions & 8 deletions storage/innobase/btr/btr0cur.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3433,7 +3433,6 @@ btr_cur_pessimistic_delete(
ulint n_reserved = 0;
ibool success;
ibool ret = FALSE;
ulint level;
mem_heap_t* heap;
ulint* offsets;

Expand Down Expand Up @@ -3484,6 +3483,10 @@ btr_cur_pessimistic_delete(
#endif /* UNIV_ZIP_DEBUG */
}

if (flags == 0) {
lock_update_delete(block, rec);
}

if (UNIV_UNLIKELY(page_get_n_recs(page) < 2)
&& UNIV_UNLIKELY(dict_index_get_page(index)
!= buf_block_get_page_no(block))) {
Expand All @@ -3498,13 +3501,7 @@ btr_cur_pessimistic_delete(
goto return_after_reservations;
}

if (flags == 0) {
lock_update_delete(block, rec);
}

level = btr_page_get_level(page, mtr);

if (level > 0
if (!page_is_leaf(page)
&& UNIV_UNLIKELY(rec == page_rec_get_next(
page_get_infimum_rec(page)))) {

Expand All @@ -3527,6 +3524,7 @@ btr_cur_pessimistic_delete(
on a page, we have to change the father node pointer
so that it is equal to the new leftmost node pointer
on the page */
ulint level = btr_page_get_level(page, mtr);

btr_node_ptr_delete(index, block, mtr);

Expand Down
14 changes: 6 additions & 8 deletions storage/xtradb/btr/btr0cur.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3624,7 +3624,6 @@ btr_cur_pessimistic_delete(
ulint n_reserved = 0;
ibool success;
ibool ret = FALSE;
ulint level;
mem_heap_t* heap;
ulint* offsets;

Expand Down Expand Up @@ -3677,6 +3676,10 @@ btr_cur_pessimistic_delete(
#endif /* UNIV_ZIP_DEBUG */
}

if (flags == 0) {
lock_update_delete(block, rec);
}

if (UNIV_UNLIKELY(page_get_n_recs(page) < 2)
&& UNIV_UNLIKELY(dict_index_get_page(index)
!= buf_block_get_page_no(block))) {
Expand All @@ -3691,13 +3694,7 @@ btr_cur_pessimistic_delete(
goto return_after_reservations;
}

if (flags == 0) {
lock_update_delete(block, rec);
}

level = btr_page_get_level(page, mtr);

if (level > 0
if (!page_is_leaf(page)
&& UNIV_UNLIKELY(rec == page_rec_get_next(
page_get_infimum_rec(page)))) {

Expand All @@ -3720,6 +3717,7 @@ btr_cur_pessimistic_delete(
on a page, we have to change the father node pointer
so that it is equal to the new leftmost node pointer
on the page */
ulint level = btr_page_get_level(page, mtr);

btr_node_ptr_delete(index, block, mtr);

Expand Down

0 comments on commit ac0b5a2

Please sign in to comment.