Commit 8e27737f authored by Vasil Dimov's avatar Vasil Dimov

Merge from mysql-5.1-innodb:

  ------------------------------------------------------------
  revno: 3437
  revision-id: marko.makela@oracle.com-20100504093128-44v6glupe1dsh0ug
  parent: marko.makela@oracle.com-20100503122859-k73bl51re93o0mt4
  committer: Marko M?kel? <marko.makela@oracle.com>
  branch nick: 5.1-innodb
  timestamp: Tue 2010-05-04 12:31:28 +0300
  message:
    btr_page_split_and_insert(): Correct the fix of Bug #52964.
    When split_rec==NULL, choose the correct node pointer key (first_rec).
  modified:
    storage/innodb_plugin/btr/btr0btr.c 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Fbtr%2Fbtr0btr.c
  ------------------------------------------------------------
parent 0f5326b4
......@@ -2003,9 +2003,13 @@ func_start:
split_rec = NULL;
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 {
insert_empty:
ut_ad(!split_rec);
ut_ad(!insert_left);
buf = mem_alloc(rec_get_converted_size(cursor->index,
tuple, n_ext));
......@@ -2029,7 +2033,11 @@ insert_empty:
&& btr_page_insert_fits(cursor, split_rec,
offsets, tuple, n_ext, heap);
} else {
if (!insert_left) {
mem_free(buf);
buf = NULL;
}
insert_will_fit = !new_page_zip
&& btr_page_insert_fits(cursor, NULL,
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