Commit ac0b5a2e authored by Marko Mäkelä's avatar Marko Mäkelä

Merge 10.0 into 10.1

parents b8488e5c de4a00d4
...@@ -3433,7 +3433,6 @@ btr_cur_pessimistic_delete( ...@@ -3433,7 +3433,6 @@ btr_cur_pessimistic_delete(
ulint n_reserved = 0; ulint n_reserved = 0;
ibool success; ibool success;
ibool ret = FALSE; ibool ret = FALSE;
ulint level;
mem_heap_t* heap; mem_heap_t* heap;
ulint* offsets; ulint* offsets;
...@@ -3484,6 +3483,10 @@ btr_cur_pessimistic_delete( ...@@ -3484,6 +3483,10 @@ btr_cur_pessimistic_delete(
#endif /* UNIV_ZIP_DEBUG */ #endif /* UNIV_ZIP_DEBUG */
} }
if (flags == 0) {
lock_update_delete(block, rec);
}
if (UNIV_UNLIKELY(page_get_n_recs(page) < 2) if (UNIV_UNLIKELY(page_get_n_recs(page) < 2)
&& UNIV_UNLIKELY(dict_index_get_page(index) && UNIV_UNLIKELY(dict_index_get_page(index)
!= buf_block_get_page_no(block))) { != buf_block_get_page_no(block))) {
...@@ -3498,13 +3501,7 @@ btr_cur_pessimistic_delete( ...@@ -3498,13 +3501,7 @@ btr_cur_pessimistic_delete(
goto return_after_reservations; goto return_after_reservations;
} }
if (flags == 0) { if (!page_is_leaf(page)
lock_update_delete(block, rec);
}
level = btr_page_get_level(page, mtr);
if (level > 0
&& UNIV_UNLIKELY(rec == page_rec_get_next( && UNIV_UNLIKELY(rec == page_rec_get_next(
page_get_infimum_rec(page)))) { page_get_infimum_rec(page)))) {
...@@ -3527,6 +3524,7 @@ btr_cur_pessimistic_delete( ...@@ -3527,6 +3524,7 @@ btr_cur_pessimistic_delete(
on a page, we have to change the father node pointer on a page, we have to change the father node pointer
so that it is equal to the new leftmost node pointer so that it is equal to the new leftmost node pointer
on the page */ on the page */
ulint level = btr_page_get_level(page, mtr);
btr_node_ptr_delete(index, block, mtr); btr_node_ptr_delete(index, block, mtr);
......
...@@ -3624,7 +3624,6 @@ btr_cur_pessimistic_delete( ...@@ -3624,7 +3624,6 @@ btr_cur_pessimistic_delete(
ulint n_reserved = 0; ulint n_reserved = 0;
ibool success; ibool success;
ibool ret = FALSE; ibool ret = FALSE;
ulint level;
mem_heap_t* heap; mem_heap_t* heap;
ulint* offsets; ulint* offsets;
...@@ -3677,6 +3676,10 @@ btr_cur_pessimistic_delete( ...@@ -3677,6 +3676,10 @@ btr_cur_pessimistic_delete(
#endif /* UNIV_ZIP_DEBUG */ #endif /* UNIV_ZIP_DEBUG */
} }
if (flags == 0) {
lock_update_delete(block, rec);
}
if (UNIV_UNLIKELY(page_get_n_recs(page) < 2) if (UNIV_UNLIKELY(page_get_n_recs(page) < 2)
&& UNIV_UNLIKELY(dict_index_get_page(index) && UNIV_UNLIKELY(dict_index_get_page(index)
!= buf_block_get_page_no(block))) { != buf_block_get_page_no(block))) {
...@@ -3691,13 +3694,7 @@ btr_cur_pessimistic_delete( ...@@ -3691,13 +3694,7 @@ btr_cur_pessimistic_delete(
goto return_after_reservations; goto return_after_reservations;
} }
if (flags == 0) { if (!page_is_leaf(page)
lock_update_delete(block, rec);
}
level = btr_page_get_level(page, mtr);
if (level > 0
&& UNIV_UNLIKELY(rec == page_rec_get_next( && UNIV_UNLIKELY(rec == page_rec_get_next(
page_get_infimum_rec(page)))) { page_get_infimum_rec(page)))) {
...@@ -3720,6 +3717,7 @@ btr_cur_pessimistic_delete( ...@@ -3720,6 +3717,7 @@ btr_cur_pessimistic_delete(
on a page, we have to change the father node pointer on a page, we have to change the father node pointer
so that it is equal to the new leftmost node pointer so that it is equal to the new leftmost node pointer
on the page */ on the page */
ulint level = btr_page_get_level(page, mtr);
btr_node_ptr_delete(index, block, mtr); btr_node_ptr_delete(index, block, mtr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment