List:Commits« Previous MessageNext Message »
From:jonas oreland Date:January 17 2012 3:22pm
Subject:bzr push into mysql-5.1-telco-7.0 branch (jonas.oreland:4798 to 4799)
Bug#13528976
View as plain text  
 4799 jonas oreland	2012-01-17
      ndb - bug#13528976 - remove cdata[] from Dbtc. It had an overflow for scans (or node-failure) with more than 32 fragments (nodes failing)

    modified:
      storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp
      storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
 4798 Frazer Clement	2012-01-17
        Refactor ndb_apply_status write_row generation
        
        Existing code splits row buffer initialisation from setting 
        and writing.  Looks like an optimisation that's been broken.
        
        This patch pulls out the buffer preparation and writing into
        a method, and calls it from one place, chipping some code and 
        locals off the Binlog Injector monolith.

    modified:
      sql/ha_ndbcluster_binlog.cc
=== modified file 'storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp'
--- a/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp	2011-12-13 12:53:03 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp	2012-01-17 15:21:49 +0000
@@ -1484,10 +1484,11 @@ private:
   void handleScanStop(Signal* signal, UintR aFailedNode);
   void initScanTcrec(Signal* signal);
   Uint32 initScanrec(ScanRecordPtr,  const class ScanTabReq*,
-		   const UintR scanParallel, 
-		   const UintR noOprecPerFrag,
-                   const Uint32 aiLength,
-                   const Uint32 keyLength);
+                     const UintR scanParallel,
+                     const UintR noOprecPerFrag,
+                     const Uint32 aiLength,
+                     const Uint32 keyLength,
+                     const Uint32 apiPtr[]);
   void initScanfragrec(Signal* signal);
   void releaseScanResources(Signal*, ScanRecordPtr, bool not_started = false);
   ScanRecordPtr seizeScanrec(Signal* signal);
@@ -1940,10 +1941,9 @@ private:
   UintR tconfig1;
   UintR tconfig2;
 
-  UintR cdata[32];
   UintR ctransidFailHash[512];
   UintR ctcConnectFailHash[1024];
-  
+
   /**
    * Commit Ack handling
    */

=== modified file 'storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2012-01-16 07:14:30 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2012-01-17 15:21:49 +0000
@@ -8382,7 +8382,8 @@ void Dbtc::execNODE_FAILREP(Signal* sign
   cfailure_nr = nodeFail->failNo;
   const Uint32 tnoOfNodes  = nodeFail->noOfNodes;
   const Uint32 tnewMasterId = nodeFail->masterNodeId;
-  
+  Uint32 cdata[MAX_NDB_NODES];
+
   arrGuard(tnoOfNodes, MAX_NDB_NODES);
   Uint32 i;
   int index = 0;
@@ -10415,7 +10416,8 @@ void Dbtc::execSCAN_TABREQ(Signal* signa
   SectionHandle handle(this, signal);
   SegmentedSectionPtr api_op_ptr;
   handle.getSection(api_op_ptr, 0);
-  copy(&cdata[0], api_op_ptr);
+  Uint32 * apiPtr = signal->theData+25; // temp storage
+  copy(apiPtr, api_op_ptr);
 
   Uint32 aiLength= 0;
   Uint32 keyLen= 0;
@@ -10541,7 +10543,8 @@ void Dbtc::execSCAN_TABREQ(Signal* signa
   ndbrequire(transP->apiScanRec == RNIL);
   ndbrequire(scanptr.p->scanApiRec == RNIL);
 
-  errCode = initScanrec(scanptr, scanTabReq, scanParallel, noOprecPerFrag, aiLength, keyLen);
+  errCode = initScanrec(scanptr, scanTabReq, scanParallel, noOprecPerFrag,
+                        aiLength, keyLen, apiPtr);
   if (unlikely(errCode))
   {
     jam();
@@ -10649,7 +10652,8 @@ Dbtc::initScanrec(ScanRecordPtr scanptr,
 		  UintR scanParallel,
 		  UintR noOprecPerFrag,
 		  Uint32 aiLength,
-		  Uint32 keyLength)
+		  Uint32 keyLength,
+                  const Uint32 apiPtr[])
 {
   const UintR ri = scanTabReq->requestInfo;
   scanptr.p->scanTcrec = tcConnectptr.i;
@@ -10701,7 +10705,7 @@ Dbtc::initScanrec(ScanRecordPtr scanptr,
     ptr.p->scanFragState = ScanFragRec::IDLE;
     ptr.p->scanRec = scanptr.i;
     ptr.p->scanFragId = 0;
-    ptr.p->m_apiPtr = cdata[i];
+    ptr.p->m_apiPtr = apiPtr[i];
   }//for
 
   (* (ScanTabReq::getRangeScanFlag(ri) ? 

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.0 branch (jonas.oreland:4798 to 4799)Bug#13528976jonas oreland18 Jan