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

Merge 5.5 into 10.0

parents 19d21b93 028d253d
......@@ -3340,7 +3340,6 @@ btr_cur_pessimistic_delete(
ulint n_reserved = 0;
ibool success;
ibool ret = FALSE;
ulint level;
mem_heap_t* heap;
ulint* offsets;
......@@ -3391,6 +3390,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))) {
......@@ -3405,13 +3408,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)))) {
......@@ -3434,6 +3431,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);
......
......@@ -3537,7 +3537,6 @@ btr_cur_pessimistic_delete(
ulint n_reserved = 0;
ibool success;
ibool ret = FALSE;
ulint level;
mem_heap_t* heap;
ulint* offsets;
......@@ -3590,6 +3589,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))) {
......@@ -3604,13 +3607,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)))) {
......@@ -3633,6 +3630,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);
......
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