MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:jonas Date:August 3 2006 12:01pm
Subject:bk commit into 4.1 tree (jonas:1.2537) BUG#20892
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of jonas. When jonas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2006-08-03 14:01:37+02:00, jonas@stripped +1 -0
  ndb - bug#20892
    Fix bug in tup buddy allocator, which made it make invalid access to cfreepagelist[16] (which is not defined)

  ndb/src/kernel/blocks/dbtup/DbtupPagMan.cpp@stripped, 2006-08-03 14:01:35+02:00, jonas@stripped +17 -13
    loop from firstListToCheck -1 (as firstListToCheck has already been checked), when looking for less than requested pages
    add if-statement for firtListToCheck == 0

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	jonas
# Host:	perch.ndb.mysql.com
# Root:	/home/jonas/src/41-work

--- 1.5/ndb/src/kernel/blocks/dbtup/DbtupPagMan.cpp	2006-08-03 14:01:39 +02:00
+++ 1.6/ndb/src/kernel/blocks/dbtup/DbtupPagMan.cpp	2006-08-03 14:01:39 +02:00
@@ -184,24 +184,28 @@
 /*       PROPER AMOUNT OF PAGES WERE NOT FOUND. FIND AS MUCH AS     */
 /*       POSSIBLE.                                                  */
 /* ---------------------------------------------------------------- */
-  for (Uint32 j = firstListToCheck; (Uint32)~j; j--) {
+  if (firstListToCheck)
+  {
     ljam();
-    if (cfreepageList[j] != RNIL) {
+    for (Uint32 j = firstListToCheck - 1; (Uint32)~j; j--) {
       ljam();
+      if (cfreepageList[j] != RNIL) {
+	ljam();
 /* ---------------------------------------------------------------- */
 /*       SOME AREA WAS FOUND, ALLOCATE ALL OF IT.                   */
 /* ---------------------------------------------------------------- */
-      allocPageRef = cfreepageList[j];
-      removeCommonArea(allocPageRef, j);
-      noOfPagesAllocated = 1 << j;
-      findFreeLeftNeighbours(allocPageRef, noOfPagesAllocated, 
-			     noOfPagesToAllocate);
-      findFreeRightNeighbours(allocPageRef, noOfPagesAllocated, 
-			      noOfPagesToAllocate);
-
-      return;
-    }//if
-  }//for
+	allocPageRef = cfreepageList[j];
+	removeCommonArea(allocPageRef, j);
+	noOfPagesAllocated = 1 << j;
+	findFreeLeftNeighbours(allocPageRef, noOfPagesAllocated, 
+			       noOfPagesToAllocate);
+	findFreeRightNeighbours(allocPageRef, noOfPagesAllocated, 
+				noOfPagesToAllocate);
+	
+	return;
+      }//if
+    }//for
+  }
 /* ---------------------------------------------------------------- */
 /*       NO FREE AREA AT ALL EXISTED. RETURN ZERO PAGES             */
 /* ---------------------------------------------------------------- */
Thread
bk commit into 4.1 tree (jonas:1.2537) BUG#20892jonas3 Aug