List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:September 7 2010 6:41pm
Subject:bzr commit into mysql-5.1-telco-7.0-spj-scan-vs-scan branch (jonas:3279)
View as plain text  
#At file:///home/jonas/src/70-spj-svs/ based on revid:ole.john.aske@stripped

 3279 Jonas Oreland	2010-09-07
      ndb - fix bug introduced by "hack-removal", batch-ranges needs to be reset when calling SCAN_NEXTREQ (as some fragments might have been completed...)

    modified:
      storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
      storage/ndb/src/kernel/blocks/dbspj/DbspjMain.cpp
=== modified file 'storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2010-09-06 19:39:57 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2010-09-07 18:41:39 +0000
@@ -9299,6 +9299,7 @@ void Dblqh::execSCAN_NEXTREQ(Signal* sig
   const Uint32 transid2 = nextReq->transId2;
   const Uint32 senderData = nextReq->senderData;
   Uint32 hashHi = signal->getSendersBlockRef();
+
   /**
    * XXX TODO handle upgrade...
    */
@@ -9350,6 +9351,14 @@ void Dblqh::execSCAN_NEXTREQ(Signal* sig
     return;
   }
 
+  if (signal->getLength() > ScanFragNextReq::SignalLength)
+  {
+    jam();
+    Uint32 corrFactorLo = signal->theData[ScanFragNextReq::SignalLength];
+    tcConnectptr.p->m_corrFactorLo &= 0xFFFF0000;
+    tcConnectptr.p->m_corrFactorLo |= corrFactorLo;
+  }
+
   scanptr.i = tcConnectptr.p->tcScanRec;
   ndbrequire(scanptr.i != RNIL);
   c_scanRecordPool.getPtr(scanptr);

=== modified file 'storage/ndb/src/kernel/blocks/dbspj/DbspjMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbspj/DbspjMain.cpp	2010-09-06 19:39:57 +0000
+++ b/storage/ndb/src/kernel/blocks/dbspj/DbspjMain.cpp	2010-09-07 18:41:39 +0000
@@ -5074,14 +5074,16 @@ Dbspj::scanIndex_execSCAN_NEXTREQ(Signal
   }
 
   const ScanFragReq * org = (const ScanFragReq*)data.m_scanFragReq;
+  const Uint32 bs_rows = MAX(1, org->batch_size_rows/cnt);
   ScanFragNextReq* req = 
     reinterpret_cast<ScanFragNextReq*>(signal->getDataPtrSend());
   req->closeFlag = 0;
   req->transId1 = requestPtr.p->m_transId[0];
   req->transId2 = requestPtr.p->m_transId[1];
-  req->batch_size_rows = MAX(1, org->batch_size_rows/cnt);
+  req->batch_size_rows = bs_rows;
   req->batch_size_bytes = org->batch_size_bytes/cnt;
   
+  Uint32 batchRange = 0;
   Ptr<ScanFragHandle> fragPtr;
   Local_ScanFragHandle_list list(m_scanfraghandle_pool, data.m_fragments);
   list.first(fragPtr);
@@ -5094,7 +5096,9 @@ Dbspj::scanIndex_execSCAN_NEXTREQ(Signal
 
       i++;
       data.m_frags_outstanding++;
+      signal->theData[ScanFragNextReq:: SignalLength] = batchRange;
       fragPtr.p->m_state = ScanFragHandle::SFH_SCANNING;
+      batchRange += bs_rows;
 
       DEBUG("scanIndex_execSCAN_NEXTREQ to: " << hex 
             << treeNodePtr.p->m_send.m_ref
@@ -5102,12 +5106,12 @@ Dbspj::scanIndex_execSCAN_NEXTREQ(Signal
 
 #ifdef DEBUG_SCAN_FRAGREQ
       printSCANNEXTREQ(stdout, &signal->theData[0], 
-                       ScanFragNextReq:: SignalLength, DBLQH);
+                       ScanFragNextReq:: SignalLength + 1, DBLQH);
 #endif
 
       req->senderData = fragPtr.i;
       sendSignal(fragPtr.p->m_ref, GSN_SCAN_NEXTREQ, signal, 
-                 ScanFragNextReq::SignalLength, 
+                 ScanFragNextReq::SignalLength + 1, 
                  JBB);
     }
   }


Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20100907184139-onw5hugb2lc072iq.bundle
Thread
bzr commit into mysql-5.1-telco-7.0-spj-scan-vs-scan branch (jonas:3279) Jonas Oreland7 Sep