List:Commits« Previous MessageNext Message »
From:jonas Date:January 31 2006 10:42am
Subject:bk commit into 5.1 tree (jonas:1.2100) BUG#10987
View as plain text  
Below is the list of changes that have just been committed into a local
5.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
  1.2100 06/01/31 11:42:36 jonas@stripped +3 -0
  bug#10987 - rpl_ndb_bank
    last bug fix revealed another bug.
    fix buffer management when parsing table descriptor

  storage/ndb/src/kernel/blocks/backup/BackupInit.cpp
    1.17 06/01/31 11:42:33 jonas@stripped +1 -1
    remove useless pages on backup record
      file buffer is good enough

  storage/ndb/src/kernel/blocks/backup/Backup.hpp
    1.16 06/01/31 11:42:33 jonas@stripped +3 -4
    remove useless pages on backup record
      file buffer is good enough

  storage/ndb/src/kernel/blocks/backup/Backup.cpp
    1.35 06/01/31 11:42:33 jonas@stripped +7 -41
    remove pages on backup record, use buffer in file record instead

# 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/mysql-5.1-new

--- 1.34/storage/ndb/src/kernel/blocks/backup/Backup.cpp	2006-01-30 08:23:51 +01:00
+++ 1.35/storage/ndb/src/kernel/blocks/backup/Backup.cpp	2006-01-31 11:42:33 +01:00
@@ -349,7 +349,6 @@
       c_backupFilePool.getPtr(lcp_file, lcp.p->dataFilePtr);
       ndbrequire(c_pagePool.getSize() == 
 		 c_pagePool.getNoOfFree() + 
-		 lcp.p->pages.getSize() + 
 		 lcp_file.p->pages.getSize());
     }
   }
@@ -906,7 +905,6 @@
     return;
   }//if
 
-  ndbrequire(ptr.p->pages.empty());
   ndbrequire(ptr.p->tables.isEmpty());
   
   ptr.p->m_gsn = 0;
@@ -2756,11 +2754,6 @@
   BackupRecordPtr ptr;
   c_backupPool.getPtr(ptr, senderData);
 
-  ndbout_c("execGET_TABINFOREF: tab: %d errorCode: %d extra: %d",
-	   ref->tableId,
-	   ref->errorCode,
-	   signal->theData[signal->getLength()-1]);
-  
   defineBackupRef(signal, ptr, ref->errorCode);
 }
 
@@ -2791,27 +2784,12 @@
   TablePtr tabPtr ;
   ndbrequire(findTable(ptr, tabPtr, tableId));
 
-  /**
-   * No of pages needed
-   */
-  const Uint32 noPages = (len + sizeof(Page32) - 1) / sizeof(Page32);
-  if(ptr.p->pages.getSize() < noPages) {
-    jam();
-    ptr.p->pages.release();
-    if(ptr.p->pages.seize(noPages) == false) {
-      jam();
-      ptr.p->setErrorCode(DefineBackupRef::FailedAllocateTableMem);
-      releaseSections(signal);
-      defineBackupRef(signal, ptr);
-      return;
-    }//if
-  }//if
-  
   BackupFilePtr filePtr;
   ptr.p->files.getPtr(filePtr, ptr.p->ctlFilePtr);
   FsBuffer & buf = filePtr.p->operation.dataBuffer;
+  Uint32* dst = 0;
   { // Write into ctl file
-    Uint32* dst, dstLen = len + 3;
+    Uint32 dstLen = len + 3;
     if(!buf.getWritePtr(&dst, dstLen)) {
       jam();
       ndbrequire(false);
@@ -2835,9 +2813,10 @@
     }//if
   }
 
+  releaseSections(signal);
+
   if(ptr.p->checkError()) {
     jam();
-    releaseSections(signal);
     defineBackupRef(signal, ptr);
     return;
   }//if
@@ -2845,7 +2824,6 @@
   if (!DictTabInfo::isTable(tabPtr.p->tableType))
   {
     jam();
-    releaseSections(signal);
 
     TablePtr tmp = tabPtr;
     ptr.p->tables.next(tabPtr);
@@ -2853,13 +2831,7 @@
     goto next;
   }
   
-  ndbrequire(ptr.p->pages.getSize() >= noPages);
-  Page32Ptr pagePtr;
-  ptr.p->pages.getPtr(pagePtr, 0);
-  copy(&pagePtr.p->data[0], dictTabInfoPtr);
-  releaseSections(signal);
-  
-  if (!parseTableDescription(signal, ptr, tabPtr, len))
+  if (!parseTableDescription(signal, ptr, tabPtr, dst, len))
   {
     jam();
     defineBackupRef(signal, ptr);
@@ -2884,8 +2856,6 @@
      */
     jam();
     
-    ptr.p->pages.release();
-    
     if(ptr.p->is_lcp())
     {
       lcp_open_file_done(signal, ptr);
@@ -2916,13 +2886,10 @@
 Backup::parseTableDescription(Signal* signal, 
 			      BackupRecordPtr ptr, 
 			      TablePtr tabPtr, 
+			      const Uint32 * tabdescptr,
 			      Uint32 len)
 {
-
-  Page32Ptr pagePtr;
-  ptr.p->pages.getPtr(pagePtr, 0);
-  
-  SimplePropertiesLinearReader it(&pagePtr.p->data[0], len);
+  SimplePropertiesLinearReader it(tabdescptr, len);
   
   it.first();
   
@@ -4448,7 +4415,6 @@
   ptr.p->files.release();
   ptr.p->tables.release();
   ptr.p->triggers.release();
-  ptr.p->pages.release();
   ptr.p->backupId = ~0;
   
   if(ptr.p->checkError())

--- 1.15/storage/ndb/src/kernel/blocks/backup/Backup.hpp	2006-01-20 05:41:55 +01:00
+++ 1.16/storage/ndb/src/kernel/blocks/backup/Backup.hpp	2006-01-31 11:42:33 +01:00
@@ -408,12 +408,12 @@
    * One record per backup
    */
   struct BackupRecord {
-    BackupRecord(Backup& b, ArrayPool<Page32> & pp, 
+    BackupRecord(Backup& b, 
 		 ArrayPool<Table> & tp, 
 		 ArrayPool<BackupFile> & bp,
 		 ArrayPool<TriggerRecord> & trp) 
       : slaveState(b, validSlaveTransitions, validSlaveTransitionsCount,1)
-      , tables(tp), triggers(trp), files(bp), pages(pp)
+      , tables(tp), triggers(trp), files(bp)
       , masterData(b), backup(b)
       {
       }
@@ -448,7 +448,6 @@
     Uint32 dataFilePtr; // Ptr.i to first data-file
     
     Uint32 backupDataLen;  // Used for (un)packing backup request
-    Array<Page32> pages;   // Used for (un)packing backup request
     SimpleProperties props;// Used for (un)packing backup request
 
     struct SlaveData {
@@ -608,7 +607,7 @@
 
   NodeId getMasterNodeId() const { return c_masterNodeId; }
   bool findTable(const BackupRecordPtr &, TablePtr &, Uint32 tableId) const;
-  bool parseTableDescription(Signal*, BackupRecordPtr ptr, TablePtr, Uint32);
+  bool parseTableDescription(Signal*, BackupRecordPtr ptr, TablePtr, const Uint32*, Uint32);
   
   bool insertFileHeader(BackupFormat::FileType, BackupRecord*, BackupFile*);
   void sendBackupRef(Signal* signal, BackupRecordPtr ptr, Uint32 errorCode);

--- 1.16/storage/ndb/src/kernel/blocks/backup/BackupInit.cpp	2006-01-20 05:41:56 +01:00
+++ 1.17/storage/ndb/src/kernel/blocks/backup/BackupInit.cpp	2006-01-31 11:42:33 +01:00
@@ -206,7 +206,7 @@
     ArrayList<BackupRecord> recs(c_backupPool);
     BackupRecordPtr ptr;
     while(recs.seize(ptr)){
-      new (ptr.p) BackupRecord(* this, c_pagePool, c_tablePool, 
+      new (ptr.p) BackupRecord(* this, c_tablePool, 
 			       c_backupFilePool, c_triggerPool);
     }
     recs.release();
Thread
bk commit into 5.1 tree (jonas:1.2100) BUG#10987jonas31 Jan