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

btr_page_split_and_insert(): Correct the fix of Bug #52964.

When split_rec==NULL, choose the correct node pointer key (first_rec).
parent 17b9e03f
...@@ -1999,9 +1999,13 @@ btr_page_split_and_insert( ...@@ -1999,9 +1999,13 @@ btr_page_split_and_insert(
split_rec = NULL; split_rec = NULL;
goto insert_empty; goto insert_empty;
} }
} else if (UNIV_UNLIKELY(insert_left)) {
first_rec = page_rec_get_next(page_get_infimum_rec(page));
move_limit = page_rec_get_next(btr_cur_get_rec(cursor));
} else { } else {
insert_empty: insert_empty:
ut_ad(!split_rec); ut_ad(!split_rec);
ut_ad(!insert_left);
buf = mem_alloc(rec_get_converted_size(cursor->index, buf = mem_alloc(rec_get_converted_size(cursor->index,
tuple, n_ext)); tuple, n_ext));
...@@ -2025,7 +2029,11 @@ btr_page_split_and_insert( ...@@ -2025,7 +2029,11 @@ btr_page_split_and_insert(
&& btr_page_insert_fits(cursor, split_rec, && btr_page_insert_fits(cursor, split_rec,
offsets, tuple, n_ext, heap); offsets, tuple, n_ext, heap);
} else { } else {
if (!insert_left) {
mem_free(buf); mem_free(buf);
buf = NULL;
}
insert_will_fit = !new_page_zip insert_will_fit = !new_page_zip
&& btr_page_insert_fits(cursor, NULL, && btr_page_insert_fits(cursor, NULL,
NULL, tuple, n_ext, heap); NULL, tuple, n_ext, heap);
......
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