List:Commits« Previous MessageNext Message »
From:jonas oreland Date:February 10 2011 8:02am
Subject:bzr commit into mysql-5.1-telco-7.0-spj-scan-vs-scan branch (jonas:3425)
View as plain text  
#At file:///home/jonas/src/70-spj-svs/ based on revid:jonas@stripped

 3425 jonas oreland	2011-02-10 [merge]
      ndb spj - merge 70

    modified:
      storage/ndb/src/ndbapi/Ndb.cpp
      storage/ndb/src/ndbapi/NdbApiSignal.cpp
      storage/ndb/src/ndbapi/NdbApiSignal.hpp
      storage/ndb/src/ndbapi/NdbOperation.cpp
      storage/ndb/src/ndbapi/NdbOperationDefine.cpp
      storage/ndb/src/ndbapi/NdbOperationSearch.cpp
      storage/ndb/src/ndbapi/NdbQueryOperation.cpp
      storage/ndb/src/ndbapi/NdbScanOperation.cpp
      storage/ndb/src/ndbapi/NdbTransaction.cpp
      storage/ndb/src/ndbapi/Ndblist.cpp
=== modified file 'storage/ndb/src/ndbapi/Ndb.cpp'
--- a/storage/ndb/src/ndbapi/Ndb.cpp	2011-02-04 17:52:38 +0000
+++ b/storage/ndb/src/ndbapi/Ndb.cpp	2011-02-10 07:55:45 +0000
@@ -163,7 +163,7 @@ Ndb::NDB_connect(Uint32 tNode) 
     releaseNdbCon(tNdbCon);
     DBUG_RETURN(4);
   }//if
-  if (tSignal->setSignal(GSN_TCSEIZEREQ) == -1) {
+  if (tSignal->setSignal(GSN_TCSEIZEREQ, DBTC) == -1) {
     releaseNdbCon(tNdbCon);
     releaseSignal(tSignal);
     DBUG_RETURN(4);

=== modified file 'storage/ndb/src/ndbapi/NdbApiSignal.cpp'
--- a/storage/ndb/src/ndbapi/NdbApiSignal.cpp	2011-02-01 23:27:25 +0000
+++ b/storage/ndb/src/ndbapi/NdbApiSignal.cpp	2011-02-10 07:55:45 +0000
@@ -106,7 +106,7 @@ Parameters:     aNdbSignalType: Type of 
 Remark:         Set signal header and allocate 128 byte. 
 ******************************************************************************/
 int 
-NdbApiSignal::setSignal(int aNdbSignalType)
+NdbApiSignal::setSignal(int aNdbSignalType, Uint32 receiversBlockNo)
 { 	
   theSendersSignalId = 0;
   switch (aNdbSignalType)
@@ -131,8 +131,9 @@ NdbApiSignal::setSignal(int aNdbSignalTy
 
     case GSN_TCKEYREQ:
     {
+      assert(blockToMain(receiversBlockNo) == DBTC);
       theTrace                = TestOrd::TraceAPI;
-      theReceiversBlockNumber = DBTC;
+      theReceiversBlockNumber = receiversBlockNo;
       theVerId_signalNumber   = GSN_TCKEYREQ;
       theLength               = TcKeyReq::SignalLength;
     }
@@ -140,8 +141,9 @@ NdbApiSignal::setSignal(int aNdbSignalTy
 
     case GSN_TCRELEASEREQ:
     {
+      assert(blockToMain(receiversBlockNo) == DBTC);
       theTrace                = TestOrd::TraceAPI;
-      theReceiversBlockNumber = DBTC;
+      theReceiversBlockNumber = receiversBlockNo;
       theVerId_signalNumber   = GSN_TCRELEASEREQ;
       theLength               = 3;
     }
@@ -149,8 +151,9 @@ NdbApiSignal::setSignal(int aNdbSignalTy
 
     case GSN_ATTRINFO:
     {
+      assert(blockToMain(receiversBlockNo) == DBTC);
       theTrace                = TestOrd::TraceAPI;
-      theReceiversBlockNumber = DBTC;
+      theReceiversBlockNumber = receiversBlockNo;
       theVerId_signalNumber   = GSN_ATTRINFO;
       theLength               = AttrInfo::MaxSignalLength;
     }
@@ -158,8 +161,9 @@ NdbApiSignal::setSignal(int aNdbSignalTy
     
     case GSN_KEYINFO:
     {
+      assert(blockToMain(receiversBlockNo) == DBTC);
       theTrace                = TestOrd::TraceAPI;
-      theReceiversBlockNumber	= DBTC;
+      theReceiversBlockNumber	= receiversBlockNo;
       theVerId_signalNumber = GSN_KEYINFO;
       theLength               = KeyInfo::MaxSignalLength; 
     }
@@ -167,8 +171,9 @@ NdbApiSignal::setSignal(int aNdbSignalTy
 
     case GSN_TCROLLBACKREQ:
     {
+      assert(blockToMain(receiversBlockNo) == DBTC);
       theTrace                = TestOrd::TraceAPI;
-      theReceiversBlockNumber = DBTC;
+      theReceiversBlockNumber = receiversBlockNo;
       theVerId_signalNumber   = GSN_TCROLLBACKREQ;
       theLength               = 3;
     }
@@ -176,8 +181,9 @@ NdbApiSignal::setSignal(int aNdbSignalTy
 
     case GSN_TC_HBREP:
     {
+      assert(blockToMain(receiversBlockNo) == DBTC);
       theTrace                = TestOrd::TraceAPI;
-      theReceiversBlockNumber = DBTC;
+      theReceiversBlockNumber = receiversBlockNo;
       theVerId_signalNumber   = GSN_TC_HBREP;
       theLength               = TcHbRep::SignalLength;
     }
@@ -185,8 +191,9 @@ NdbApiSignal::setSignal(int aNdbSignalTy
 
     case GSN_TC_COMMITREQ:
     {
+      assert(blockToMain(receiversBlockNo) == DBTC);
       theTrace                = TestOrd::TraceAPI;
-      theReceiversBlockNumber = DBTC;
+      theReceiversBlockNumber = receiversBlockNo;
       theVerId_signalNumber   = GSN_TC_COMMITREQ;
       theLength               = 3;
     }
@@ -194,8 +201,9 @@ NdbApiSignal::setSignal(int aNdbSignalTy
 
     case GSN_SCAN_TABREQ:
     {
+      assert(blockToMain(receiversBlockNo) == DBTC);
       theTrace                = TestOrd::TraceAPI;
-      theReceiversBlockNumber = DBTC;
+      theReceiversBlockNumber = receiversBlockNo;
       theVerId_signalNumber   = GSN_SCAN_TABREQ;
       theLength               = ScanTabReq::StaticLength;      
     }
@@ -203,8 +211,9 @@ NdbApiSignal::setSignal(int aNdbSignalTy
 
     case GSN_SCAN_NEXTREQ:
     {
+      assert(blockToMain(receiversBlockNo) == DBTC);
       theTrace                = TestOrd::TraceAPI;
-      theReceiversBlockNumber = DBTC;
+      theReceiversBlockNumber = receiversBlockNo;
       theVerId_signalNumber   = GSN_SCAN_NEXTREQ;
       theLength               = ScanNextReq::SignalLength;
     }
@@ -230,8 +239,9 @@ NdbApiSignal::setSignal(int aNdbSignalTy
 
     case GSN_TCINDXREQ:
     {
+      assert(blockToMain(receiversBlockNo) == DBTC);
       theTrace                = TestOrd::TraceAPI;
-      theReceiversBlockNumber = DBTC;
+      theReceiversBlockNumber = receiversBlockNo;
       theVerId_signalNumber   = GSN_TCINDXREQ;
       theLength               = TcKeyReq::SignalLength;
     }
@@ -239,8 +249,9 @@ NdbApiSignal::setSignal(int aNdbSignalTy
 
     case GSN_INDXKEYINFO:
     {
+      assert(blockToMain(receiversBlockNo) == DBTC);
       theTrace                = TestOrd::TraceAPI;
-      theReceiversBlockNumber = DBTC;
+      theReceiversBlockNumber = receiversBlockNo;
       theVerId_signalNumber   = GSN_INDXKEYINFO;
       theLength               = IndxKeyInfo::MaxSignalLength; 
     }
@@ -248,8 +259,9 @@ NdbApiSignal::setSignal(int aNdbSignalTy
 
     case GSN_INDXATTRINFO:
     {
+      assert(blockToMain(receiversBlockNo) == DBTC);
       theTrace                = TestOrd::TraceAPI;
-      theReceiversBlockNumber = DBTC;
+      theReceiversBlockNumber = receiversBlockNo;
       theVerId_signalNumber   = GSN_INDXATTRINFO;
       theLength               = IndxAttrInfo::MaxSignalLength;
     }

=== modified file 'storage/ndb/src/ndbapi/NdbApiSignal.hpp'
--- a/storage/ndb/src/ndbapi/NdbApiSignal.hpp	2011-02-01 23:27:25 +0000
+++ b/storage/ndb/src/ndbapi/NdbApiSignal.hpp	2011-02-10 07:55:45 +0000
@@ -60,8 +60,9 @@ public:  
   
   void 			setData(Uint32 aWord, Uint32 aDataNo);  
   Uint32 		readData(Uint32 aDataNo) const; // Read word in signal
-  
-  int 			setSignal(int NdbSignalType);  	// Set signal header  
+
+  // Set signal header
+  int                   setSignal(int NdbSignalType, Uint32 receiverBlockNo);
   int 			readSignalNumber() const;	// Read signal number
   Uint32             	getLength() const;
   void	             	setLength(Uint32 aLength);

=== modified file 'storage/ndb/src/ndbapi/NdbOperation.cpp'
--- a/storage/ndb/src/ndbapi/NdbOperation.cpp	2011-02-08 15:06:35 +0000
+++ b/storage/ndb/src/ndbapi/NdbOperation.cpp	2011-02-10 08:02:41 +0000
@@ -182,7 +182,7 @@ NdbOperation::init(const NdbTableImpl* t
     return -1;
   }
   theTCREQ = tSignal;
-  theTCREQ->setSignal(m_tcReqGSN);
+  theTCREQ->setSignal(m_tcReqGSN, DBTC);
 
   theAI_LenInCurrAI = 20;
   TcKeyReq * const tcKeyReq = CAST_PTR(TcKeyReq, theTCREQ->getDataPtrSend());

=== modified file 'storage/ndb/src/ndbapi/NdbOperationDefine.cpp'
--- a/storage/ndb/src/ndbapi/NdbOperationDefine.cpp	2011-02-04 11:45:24 +0000
+++ b/storage/ndb/src/ndbapi/NdbOperationDefine.cpp	2011-02-10 08:02:41 +0000
@@ -951,7 +951,7 @@ NdbOperation::insertATTRINFO( Uint32 aDa
     tAI_LenInCurrAI = 3;
     tSignal = tNdb->getSignal();
     if (tSignal != NULL) {
-      tSignal->setSignal(m_attrInfoGSN);
+      tSignal->setSignal(m_attrInfoGSN, DBTC);
       tAttrPtr = &tSignal->getDataPtrSend()[3];
       if (tFirstAttrinfo == NULL) {
         tSignal->next(NULL);
@@ -1008,7 +1008,7 @@ NdbOperation::insertATTRINFOloop(registe
       tAI_LenInCurrAI = 3;
       tSignal = tNdb->getSignal();
       if (tSignal != NULL) {
-        tSignal->setSignal(m_attrInfoGSN);
+        tSignal->setSignal(m_attrInfoGSN, DBTC);
         tAttrPtr = &tSignal->getDataPtrSend()[3];
         if (tFirstAttrinfo == NULL) {
           tSignal->next(NULL);

=== modified file 'storage/ndb/src/ndbapi/NdbOperationSearch.cpp'
--- a/storage/ndb/src/ndbapi/NdbOperationSearch.cpp	2011-02-01 23:27:25 +0000
+++ b/storage/ndb/src/ndbapi/NdbOperationSearch.cpp	2011-02-10 07:55:45 +0000
@@ -381,7 +381,7 @@ NdbOperation::insertKEYINFO(const char* 
       setErrorCodeAbort(4000);
       return -1;
     }
-    if (tSignal->setSignal(m_keyInfoGSN) == -1)
+    if (tSignal->setSignal(m_keyInfoGSN, DBTC) == -1)
     {
       setErrorCodeAbort(4001);
       return -1;

=== modified file 'storage/ndb/src/ndbapi/NdbQueryOperation.cpp'
--- a/storage/ndb/src/ndbapi/NdbQueryOperation.cpp	2011-02-09 13:15:56 +0000
+++ b/storage/ndb/src/ndbapi/NdbQueryOperation.cpp	2011-02-10 08:02:41 +0000
@@ -2493,7 +2493,7 @@ NdbQueryImpl::doSend(int nodeId, bool la
     assert (root.getMaxBatchRows() > 0);
 
     NdbApiSignal tSignal(&ndb);
-    tSignal.setSignal(GSN_SCAN_TABREQ);
+    tSignal.setSignal(GSN_SCAN_TABREQ, DBTC);
 
     ScanTabReq * const scanTabReq = CAST_PTR(ScanTabReq, tSignal.getDataPtrSend());
     Uint32 reqInfo = 0;
@@ -2594,7 +2594,7 @@ NdbQueryImpl::doSend(int nodeId, bool la
   } else {  // Lookup query
 
     NdbApiSignal tSignal(&ndb);
-    tSignal.setSignal(GSN_TCKEYREQ);
+    tSignal.setSignal(GSN_TCKEYREQ, DBTC);
 
     TcKeyReq * const tcKeyReq = CAST_PTR(TcKeyReq, tSignal.getDataPtrSend());
 
@@ -2739,7 +2739,7 @@ NdbQueryImpl::sendFetchMore(NdbRootFragm
 
   Ndb& ndb = *getNdbTransaction().getNdb();
   NdbApiSignal tSignal(&ndb);
-  tSignal.setSignal(GSN_SCAN_NEXTREQ);
+  tSignal.setSignal(GSN_SCAN_NEXTREQ, DBTC);
   ScanNextReq * const scanNextReq = 
     CAST_PTR(ScanNextReq, tSignal.getDataPtrSend());
   
@@ -2881,7 +2881,7 @@ NdbQueryImpl::sendClose(int nodeId)
 
   Ndb& ndb = *m_transaction.getNdb();
   NdbApiSignal tSignal(&ndb);
-  tSignal.setSignal(GSN_SCAN_NEXTREQ);
+  tSignal.setSignal(GSN_SCAN_NEXTREQ, DBTC);
   ScanNextReq * const scanNextReq = CAST_PTR(ScanNextReq, tSignal.getDataPtrSend());
 
   assert (m_scanTransaction);

=== modified file 'storage/ndb/src/ndbapi/NdbScanOperation.cpp'
--- a/storage/ndb/src/ndbapi/NdbScanOperation.cpp	2011-02-09 14:59:39 +0000
+++ b/storage/ndb/src/ndbapi/NdbScanOperation.cpp	2011-02-10 08:02:41 +0000
@@ -1411,7 +1411,7 @@ NdbScanOperation::processTableScanDefs(N
     return -1;
   }//if
   
-  theSCAN_TABREQ->setSignal(GSN_SCAN_TABREQ);
+  theSCAN_TABREQ->setSignal(GSN_SCAN_TABREQ, DBTC);
   ScanTabReq * req = CAST_PTR(ScanTabReq, theSCAN_TABREQ->getDataPtrSend());
   req->apiConnectPtr = theNdbCon->theTCConPtr;
   req->tableId = m_accessTable->m_id;
@@ -1977,7 +1977,7 @@ NdbScanOperation::send_next_scan(Uint32 
 {
   if(cnt > 0){
     NdbApiSignal tSignal(theNdb->theMyRef);
-    tSignal.setSignal(GSN_SCAN_NEXTREQ);
+    tSignal.setSignal(GSN_SCAN_NEXTREQ, DBTC);
     
     Uint32* theData = tSignal.getDataPtrSend();
     theData[0] = theNdbCon->theTCConPtr;
@@ -2639,7 +2639,7 @@ NdbScanOperation::takeOverScanOp(Operati
     
     Uint32 left = len - i;
     while(tSignal && left > KeyInfo::DataLength){
-      tSignal->setSignal(GSN_KEYINFO);
+      tSignal->setSignal(GSN_KEYINFO, DBTC);
       tSignal->setLength(KeyInfo::MaxSignalLength);
       KeyInfo * keyInfo = CAST_PTR(KeyInfo, tSignal->getDataPtrSend());
       memcpy(keyInfo->keyData, src, 4 * KeyInfo::DataLength);
@@ -2652,7 +2652,7 @@ NdbScanOperation::takeOverScanOp(Operati
     }
     
     if(tSignal && left > 0){
-      tSignal->setSignal(GSN_KEYINFO);
+      tSignal->setSignal(GSN_KEYINFO, DBTC);
       tSignal->setLength(KeyInfo::HeaderLength + left);
       newOp->theLastKEYINFO = tSignal;
       KeyInfo * keyInfo = CAST_PTR(KeyInfo, tSignal->getDataPtrSend());
@@ -3796,7 +3796,7 @@ NdbIndexScanOperation::send_next_scan_or
   
   NdbReceiver* tRec = m_api_receivers[idx];
   NdbApiSignal tSignal(theNdb->theMyRef);
-  tSignal.setSignal(GSN_SCAN_NEXTREQ);
+  tSignal.setSignal(GSN_SCAN_NEXTREQ, DBTC);
   
   Uint32 last = m_sent_receivers_count;
   Uint32* theData = tSignal.getDataPtrSend();

=== modified file 'storage/ndb/src/ndbapi/NdbTransaction.cpp'
--- a/storage/ndb/src/ndbapi/NdbTransaction.cpp	2011-02-09 13:15:56 +0000
+++ b/storage/ndb/src/ndbapi/NdbTransaction.cpp	2011-02-10 08:02:41 +0000
@@ -960,7 +960,7 @@ NdbTransaction::sendTC_HBREP()		// Send 
     return -1;
   }
 
-  if (tSignal->setSignal(GSN_TC_HBREP) == -1) {
+  if (tSignal->setSignal(GSN_TC_HBREP, DBTC) == -1) {
     return -1;
   }
 
@@ -1112,7 +1112,7 @@ NdbTransaction::sendROLLBACK()      // S
 
     tTransId1 = (Uint32) theTransactionId;
     tTransId2 = (Uint32) (theTransactionId >> 32);
-    tSignal.setSignal(GSN_TCROLLBACKREQ);
+    tSignal.setSignal(GSN_TCROLLBACKREQ, DBTC);
     tSignal.setData(theTCConPtr, 1);
     tSignal.setData(tTransId1, 2);
     tSignal.setData(tTransId2, 3);
@@ -1165,7 +1165,7 @@ NdbTransaction::sendCOMMIT()    // Send 
 
   tTransId1 = (Uint32) theTransactionId;
   tTransId2 = (Uint32) (theTransactionId >> 32);
-  tSignal.setSignal(GSN_TC_COMMITREQ);
+  tSignal.setSignal(GSN_TC_COMMITREQ, DBTC);
   tSignal.setData(theTCConPtr, 1);
   tSignal.setData(tTransId1, 2);
   tSignal.setData(tTransId2, 3);

=== modified file 'storage/ndb/src/ndbapi/Ndblist.cpp'
--- a/storage/ndb/src/ndbapi/Ndblist.cpp	2011-02-01 23:27:25 +0000
+++ b/storage/ndb/src/ndbapi/Ndblist.cpp	2011-02-10 07:55:45 +0000
@@ -481,7 +481,7 @@ Ndb::releaseConnectToNdb(NdbTransaction*
 
   Uint32 node_id = a_con->getConnectedNodeId();
   Uint32 conn_seq = a_con->theNodeSequence;
-  tSignal.setSignal(GSN_TCRELEASEREQ);
+  tSignal.setSignal(GSN_TCRELEASEREQ, DBTC);
   tSignal.setData((tConPtr = a_con->getTC_ConnectPtr()), 1);
   tSignal.setData(theMyRef, 2);
   tSignal.setData(a_con->ptr2int(), 3); 

No bundle (reason: revision is a merge).
Thread
bzr commit into mysql-5.1-telco-7.0-spj-scan-vs-scan branch (jonas:3425) jonas oreland10 Feb