List:Commits« Previous MessageNext Message »
From:Satya B Date:November 30 2009 8:50am
Subject:bzr commit into mysql-5.1-bugteam branch (satya.bn:3214) Bug#48469
View as plain text  
#At file:///home/satya/WORK/mysql/mysql-5.1-bugteam/ based on revid:satya.bn@stripped

 3214 Satya B	2009-11-30
      Applying InnoDB snapshot 5.1-ss6242, part 3. Fixes BUG#48469
      
      1. BUG#4869 - when innodb tablespace is configured too small,
                    crash and corruption!
      
      Detailed revision comments:
      
      r6187 | jyang | 2009-11-18 05:27:30 +0200 (Wed, 18 Nov 2009) | 9 lines
      branches/5.1: Fix bug #48469 "when innodb tablespace is
      configured too small, crash and corruption!". Function
      btr_create() did not check the return status of fseg_create(),
      and continue the index creation even there is no sufficient
      space.
      
      rb://205 Approved by Marko
      
      r6200 | vasil | 2009-11-19 12:14:23 +0200 (Thu, 19 Nov 2009) | 4 lines
      branches/5.1:
      
      White space fixup - indent under the opening (
      
      r6203 | jyang | 2009-11-19 15:12:22 +0200 (Thu, 19 Nov 2009) | 8 lines
      branches/5.1: Use btr_free_root() instead of fseg_free() for
      the fix of bug #48469, because fseg_free() is not defined
      in the zip branch. And we could save one mini-trasaction started
      by fseg_free().
      
      Approved by Marko.

    modified:
      storage/innobase/btr/btr0btr.c
=== modified file 'storage/innobase/btr/btr0btr.c'
--- a/storage/innobase/btr/btr0btr.c	2007-07-10 14:34:21 +0000
+++ b/storage/innobase/btr/btr0btr.c	2009-11-30 08:50:08 +0000
@@ -709,8 +709,15 @@ btr_create(
 	} else {
 		/* It is a non-ibuf tree: create a file segment for leaf
 		pages */
-		fseg_create(space, page_no, PAGE_HEADER + PAGE_BTR_SEG_LEAF,
-			    mtr);
+		if (!fseg_create(space, page_no,
+				 PAGE_HEADER + PAGE_BTR_SEG_LEAF, mtr)) {
+			/* Not enough space for new segment, free root
+			segment before return. */
+			btr_free_root(space, page_no, mtr);
+
+			return(FIL_NULL);
+		}
+
 		/* The fseg create acquires a second latch on the page,
 		therefore we must declare it: */
 #ifdef UNIV_SYNC_DEBUG


Attachment: [text/bzr-bundle] bzr/satya.bn@sun.com-20091130085008-x83dn1al9wp7b5ar.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (satya.bn:3214) Bug#48469Satya B30 Nov