Commit 374ad00b authored by sunny's avatar sunny

branches/zip: Fix bug introduced in r2453.

parent bda75d7b
......@@ -1796,15 +1796,17 @@ btr_page_split_and_insert(
hint_page_no = page_no + 1;
if (page_get_n_recs(page) == 1) {
page_cur_t pcur;
/* There is only one record in the index page
therefore we can't split the node in the middle
by default. We need to determine whether the
new record will be inserted to the left or right. */
/* Read the first (and only) record in the page. */
page_cur_set_before_first(block, page_cursor);
page_cur_move_to_next(page_cursor);
first_rec = page_cur_get_rec(page_cursor);
page_cur_set_before_first(block, &pcur);
page_cur_move_to_next(&pcur);
first_rec = page_cur_get_rec(&pcur);
offsets = rec_get_offsets(
first_rec, cursor->index, offsets,
......
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