summaryrefslogtreecommitdiff
path: root/storage/innobase/btr/btr0cur.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-10-02 10:42:55 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2017-10-02 10:42:55 +0300
commitde4a00d4f7b4a299cf8fba7bb501fbbbe558ae17 (patch)
tree826a9adca2e3a1b6921e0e709f2e63ac5cd4a239 /storage/innobase/btr/btr0cur.cc
parent19d21b9366c1eb5c1c1e822a09969e9a23bfe2c3 (diff)
parent028d253dd7401fa564bcf817fe81c7034f2512d2 (diff)
downloadmariadb-git-de4a00d4f7b4a299cf8fba7bb501fbbbe558ae17.tar.gz
Merge 5.5 into 10.0
Diffstat (limited to 'storage/innobase/btr/btr0cur.cc')
-rw-r--r--storage/innobase/btr/btr0cur.cc14
1 files changed, 6 insertions, 8 deletions
diff --git a/storage/innobase/btr/btr0cur.cc b/storage/innobase/btr/btr0cur.cc
index 7ca38c5b67d..9ca2cc8e50b 100644
--- a/storage/innobase/btr/btr0cur.cc
+++ b/storage/innobase/btr/btr0cur.cc
@@ -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);