List:Commits« Previous MessageNext Message »
From:marko.makela Date:May 4 2010 9:31am
Subject:bzr commit into mysql-5.1-innodb branch (marko.makela:3437) Bug#52964
View as plain text  
#At file:///home/marko/innobase/dev/mysql/5.1-innodb/ based on revid:marko.makela@stripped1re93o0mt4

 3437 Marko Mäkelä	2010-05-04
      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
=== modified file 'storage/innodb_plugin/btr/btr0btr.c'
--- a/storage/innodb_plugin/btr/btr0btr.c	2010-04-26 07:39:49 +0000
+++ b/storage/innodb_plugin/btr/btr0btr.c	2010-05-04 09:31:28 +0000
@@ -1999,9 +1999,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));
 
@@ -2025,7 +2029,11 @@ insert_empty:
 			&& btr_page_insert_fits(cursor, split_rec,
 						offsets, tuple, n_ext, heap);
 	} else {
-		mem_free(buf);
+		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);

Attachment: [text/bzr-bundle] bzr/marko.makela@oracle.com-20100504093128-44v6glupe1dsh0ug.bundle
Thread
bzr commit into mysql-5.1-innodb branch (marko.makela:3437) Bug#52964marko.makela4 May