MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:April 5 2009 8:56pm
Subject:bzr commit into mysql-5.1-telco-6.2 branch (jonas:2899) Bug#44099
View as plain text  
#At file:///home/jonas/src/telco-6.2/

 2899 Jonas Oreland	2009-04-05
      ndb - bug#44099 - move SCAN_HB handling to LQH, and check it once per row returned from ACC_SCAN
modified:
  storage/ndb/src/kernel/blocks/dbacc/Dbacc.hpp
  storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
  storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp
  storage/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp
  storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
  storage/ndb/src/kernel/blocks/qmgr/Qmgr.hpp
  storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp

=== modified file 'storage/ndb/src/kernel/blocks/dbacc/Dbacc.hpp'
--- a/storage/ndb/src/kernel/blocks/dbacc/Dbacc.hpp	2008-05-29 15:58:58 +0000
+++ b/storage/ndb/src/kernel/blocks/dbacc/Dbacc.hpp	2009-04-05 20:56:43 +0000
@@ -148,7 +148,6 @@ ndbout << "Ptr: " << ptr.p->word32 << " 
 /* CONTINUEB CODES                                                                   */
 /* --------------------------------------------------------------------------------- */
 #define ZINITIALISE_RECORDS 1
-#define ZSEND_SCAN_HBREP 4
 #define ZREL_ROOT_FRAG 5
 #define ZREL_FRAG 6
 #define ZREL_DIR 7
@@ -605,8 +604,6 @@ struct ScanRec {
   Uint32 scanUserblockref;
   Uint32 scanMask;
   Uint8 scanLockMode;
-  Uint8 scanTimer;
-  Uint8 scanContinuebCounter;
   Uint8 scanReadCommittedFlag;
 }; 
 
@@ -817,7 +814,6 @@ private:
   void sendSystemerror(Signal* signal, int line);
   void takeRecOutOfFreeOverdir(Signal* signal);
   void takeRecOutOfFreeOverpage(Signal* signal);
-  void sendScanHbRep(Signal* signal, Uint32);
 
   void addFragRefuse(Signal* signal, Uint32 errorCode);
   void ndbsttorryLab(Signal* signal);

=== modified file 'storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp	2008-10-21 22:53:32 +0000
+++ b/storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp	2009-04-05 20:56:43 +0000
@@ -83,10 +83,6 @@ void Dbacc::execCONTINUEB(Signal* signal
     initialiseRecordsLab(signal, signal->theData[3], signal->theData[4]);
     return;
     break;
-  case ZSEND_SCAN_HBREP:
-    jam();
-    sendScanHbRep(signal, tdata0);
-    break;
   case ZREL_ROOT_FRAG:
     {
       jam();
@@ -519,8 +515,6 @@ void Dbacc::initialiseScanRec(Signal* si
     ptrAss(scanPtr, scanRec);
     scanPtr.p->scanNextfreerec = scanPtr.i + 1;
     scanPtr.p->scanState = ScanRec::SCAN_DISCONNECT;
-    scanPtr.p->scanTimer = 0;
-    scanPtr.p->scanContinuebCounter = 0;
   }//for
   scanPtr.i = cscanRecSize - 1;
   ptrAss(scanPtr, scanRec);
@@ -6277,18 +6271,6 @@ void Dbacc::execACC_SCANREQ(Signal* sign
   scanPtr.p->scanState = ScanRec::WAIT_NEXT;
   initScanFragmentPart(signal);
 
-  /*------------------------------------------------------*/
-  /* We start the timeout loop for the scan process here. */
-  /*------------------------------------------------------*/
-  ndbrequire(scanPtr.p->scanTimer == 0);
-  if (scanPtr.p->scanContinuebCounter == 0) {
-    jam();
-    scanPtr.p->scanContinuebCounter = 1;
-    signal->theData[0] = ZSEND_SCAN_HBREP;
-    signal->theData[1] = scanPtr.i;
-    sendSignalWithDelay(cownBlockref, GSN_CONTINUEB, signal, 100, 2);
-  }//if
-  scanPtr.p->scanTimer = scanPtr.p->scanContinuebCounter;
   /* ************************ */
   /*  ACC_SCANCONF            */
   /* ************************ */
@@ -6327,7 +6309,6 @@ void Dbacc::execNEXT_SCANREQ(Signal* sig
   ptrCheckGuard(scanPtr, cscanRecSize, scanRec);
   ndbrequire(scanPtr.p->scanState == ScanRec::WAIT_NEXT);
 
-  scanPtr.p->scanTimer = scanPtr.p->scanContinuebCounter;
   switch (tscanNextFlag) {
   case NextScanReq::ZSCAN_NEXT:
     jam();
@@ -6663,7 +6644,6 @@ void Dbacc::releaseScanLab(Signal* signa
     }//if
   }//for
   // Stops the heartbeat.
-  scanPtr.p->scanTimer = 0;
   signal->theData[0] = scanPtr.p->scanUserptr;
   signal->theData[1] = RNIL;
   signal->theData[2] = RNIL;
@@ -6854,8 +6834,6 @@ void Dbacc::execACC_CHECK_SCAN(Signal* s
     return;
   }//if
 
-  scanPtr.p->scanTimer = scanPtr.p->scanContinuebCounter;
-
   fragrecptr.i = scanPtr.p->activeLocalFrag;
   ptrCheckGuard(fragrecptr, cfragmentsize, fragmentrec);
   gnsDirRangePtr.i = fragrecptr.p->directory;
@@ -7351,7 +7329,6 @@ bool Dbacc::searchScanContainer(Signal* 
 /* --------------------------------------------------------------------------------- */
 void Dbacc::sendNextScanConf(Signal* signal) 
 {
-  scanPtr.p->scanTimer = scanPtr.p->scanContinuebCounter;
   Uint32 blockNo = refToBlock(scanPtr.p->scanUserblockref);
   jam();
   /** ---------------------------------------------------------------------
@@ -7368,41 +7345,6 @@ void Dbacc::sendNextScanConf(Signal* sig
   return;
 }//Dbacc::sendNextScanConf()
 
-/*---------------------------------------------------------------------------
- * sendScanHbRep     	      	             	      	             	       
- * Description: Using Dispatcher::execute() to send a heartbeat to DBTC
- *     	from DBLQH telling the scan is alive. We use the sendScanHbRep()
- *     	in DBLQH, this needs to be done here in DBACC since it can take
- *	a while before LQH receives an answer the normal way from ACC. 
- *--------------------------------------------------------------------------*/
-void Dbacc::sendScanHbRep(Signal* signal, Uint32 scanPtrIndex)
-{
-  scanPtr.i = scanPtrIndex;
-  ptrCheckGuard(scanPtr, cscanRecSize, scanRec);
- 
-  // If the timer status is on we continue with a new heartbeat in one second,
-  // else the loop stops and we will not send a new CONTINUEB
-  if (scanPtr.p->scanTimer != 0){
-    if (scanPtr.p->scanTimer == scanPtr.p->scanContinuebCounter){
-      jam();
-      ndbrequire(scanPtr.p->scanState != ScanRec::SCAN_DISCONNECT);
-
-      signal->theData[0] = scanPtr.p->scanUserptr;
-      signal->theData[1] = scanPtr.p->scanTrid1;
-      signal->theData[2] = scanPtr.p->scanTrid2;
-      EXECUTE_DIRECT(DBLQH, GSN_SCAN_HBREP, signal, 3);
-      jamEntry();
-    }//if
-    scanPtr.p->scanContinuebCounter++;
-    signal->theData[0] = ZSEND_SCAN_HBREP;
-    signal->theData[1] = scanPtr.i;
-    sendSignalWithDelay(cownBlockref, GSN_CONTINUEB, signal, 100, 2);
-  } else {
-    jam();
-    scanPtr.p->scanContinuebCounter = 0;
-  }//if
-}//Dbacc::sendScanHbRep()			
-
 /* --------------------------------------------------------------------------------- */
 /* SETLOCK                                                                           */
 /*          DESCRIPTION:SETS LOCK ON AN ELEMENT. INFORMATION ABOUT THE ELEMENT IS    */
@@ -8263,10 +8205,7 @@ Dbacc::execDUMP_STATE_ORD(Signal* signal
     infoEvent("Dbacc::ScanRec[%d]: state=%d, transid(0x%x, 0x%x)",
 	      scanPtr.i, scanPtr.p->scanState,scanPtr.p->scanTrid1,
 	      scanPtr.p->scanTrid2);
-    infoEvent(" timer=%d, continueBCount=%d, "
-	      "activeLocalFrag=%d, nextBucketIndex=%d",
-	      scanPtr.p->scanTimer,
-	      scanPtr.p->scanContinuebCounter,
+    infoEvent(" activeLocalFrag=%d, nextBucketIndex=%d",
 	      scanPtr.p->activeLocalFrag,
 	      scanPtr.p->nextBucketIndex);
     infoEvent(" scanNextfreerec=%d firstActOp=%d firstLockedOp=%d, "

=== modified file 'storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp	2009-02-02 21:21:34 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp	2009-04-05 20:56:43 +0000
@@ -548,6 +548,7 @@ public:
     UintR scanAiLength;
     UintR scanErrorCounter;
     UintR scanSchemaVersion;
+    Uint32 scanTcWaiting; // When the request came from TC, 0 is no request
 
     /**
      * This is _always_ main table, even in range scan
@@ -575,7 +576,6 @@ public:
     Uint8 descending;
     Uint8 tupScan;
     Uint8 lcpScan;
-    Uint8 scanTcWaiting;
     Uint8 scanKeyinfoFlag;
     Uint8 m_last_row;
   }; // Size 272 bytes
@@ -2162,7 +2162,6 @@ private:
   void execFSWRITEREF(Signal* signal);
   void execFSREADCONF(Signal* signal);
   void execFSREADREF(Signal* signal);
-  void execSCAN_HBREP(Signal* signal);
   void execTIME_SIGNAL(Signal* signal);
   void execFSSYNCCONF(Signal* signal);
 
@@ -2557,6 +2556,8 @@ private:
   void send_restore_lcp(Signal * signal);
   void execRESTORE_LCP_REF(Signal* signal);
   void execRESTORE_LCP_CONF(Signal* signal);
+
+  void check_send_scan_hb_rep(Signal* signal, ScanRecord*, TcConnectionrec*);
   
   Dbtup* c_tup;
   Dbacc* c_acc;
@@ -2861,6 +2862,7 @@ private:
   BlockReference ctupBlockref;
   BlockReference ctuxBlockref;
   BlockReference cownref;
+  Uint32 cTransactionDeadlockDetectionTimeout;
   UintR cLqhTimeOutCount;
   UintR cLqhTimeOutCheckCount;
   UintR cnoOfLogPages;

=== modified file 'storage/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp	2008-12-08 12:35:55 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp	2009-04-05 20:56:43 +0000
@@ -38,6 +38,7 @@ void Dblqh::initData() 
   ctabrecFileSize = 0;
   ctcConnectrecFileSize = 0;
   ctcNodeFailrecFileSize = MAX_NDB_NODES;
+  cTransactionDeadlockDetectionTimeout = 100;
 
   addFragRecord = 0;
   attrbuf = 0;
@@ -198,7 +199,6 @@ Dblqh::Dblqh(Block_context& ctx):
   addRecSignal(GSN_START_EXEC_SR, &Dblqh::execSTART_EXEC_SR);
   addRecSignal(GSN_EXEC_SRREQ, &Dblqh::execEXEC_SRREQ);
   addRecSignal(GSN_EXEC_SRCONF, &Dblqh::execEXEC_SRCONF);
-  addRecSignal(GSN_SCAN_HBREP, &Dblqh::execSCAN_HBREP);
 
   addRecSignal(GSN_ALTER_TAB_REQ, &Dblqh::execALTER_TAB_REQ);
 

=== modified file 'storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2009-04-03 08:06:36 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2009-04-05 20:56:43 +0000
@@ -1093,6 +1093,9 @@ void Dblqh::execREAD_CONFIG_REQ(Signal* 
   {
     ndbrequire(cmaxLogFilesInPageZero);
   }
+
+  ndb_mgm_get_int_parameter(p, CFG_DB_TRANSACTION_DEADLOCK_TIMEOUT, 
+                            &cTransactionDeadlockDetectionTimeout);
   
   initRecords();
   initialiseRecordsLab(signal, 0, ref, senderData);
@@ -2216,7 +2219,7 @@ void Dblqh::execTIME_SIGNAL(Signal* sign
   jamEntry();
   cLqhTimeOutCount++;
   cLqhTimeOutCheckCount++;
-  if (cLqhTimeOutCheckCount < 10) {
+  if (cLqhTimeOutCheckCount < 1000) {
     jam();
     return;
   }//if
@@ -2229,12 +2232,12 @@ void Dblqh::execTIME_SIGNAL(Signal* sign
     jam();
     ptrAss(tTcConptr, tcConnectionrec);
     if ((tTcConptr.p->tcTimer != 0) &&
-	((tTcConptr.p->tcTimer + 120) < cLqhTimeOutCount)) {
+	((tTcConptr.p->tcTimer + 12000) < cLqhTimeOutCount)) {
       ndbout << "Dblqh::execTIME_SIGNAL"<<endl
 	     << "Timeout found in tcConnectRecord " <<tTcConptr.i<<endl
 	     << " cLqhTimeOutCount = " << cLqhTimeOutCount << endl
 	     << " tcTimer="<<tTcConptr.p->tcTimer<<endl
-	     << " tcTimer+120="<<tTcConptr.p->tcTimer + 120<<endl;
+	     << " tcTimer+12000="<<tTcConptr.p->tcTimer + 12000<<endl;
 
       signal->theData[0] = 2307;
       signal->theData[1] = tTcConptr.i;
@@ -2249,7 +2252,7 @@ void Dblqh::execTIME_SIGNAL(Signal* sign
   for (lfoPtr.i = 0; lfoPtr.i < clfoFileSize; lfoPtr.i++) {
     ptrAss(lfoPtr, logFileOperationRecord);
     if ((lfoPtr.p->lfoTimer != 0) &&
-        ((lfoPtr.p->lfoTimer + 120) < cLqhTimeOutCount)) {
+        ((lfoPtr.p->lfoTimer + 12000) < cLqhTimeOutCount)) {
       ndbout << "We have lost LFO record" << endl;
       ndbout << "index = " << lfoPtr.i;
       ndbout << "State = " << lfoPtr.p->lfoState;
@@ -8181,7 +8184,7 @@ void Dblqh::execSCAN_NEXTREQ(Signal* sig
   scanptr.i = tcConnectptr.p->tcScanRec;
   ndbrequire(scanptr.i != RNIL);
   c_scanRecordPool.getPtr(scanptr);
-  scanptr.p->scanTcWaiting = ZTRUE;
+  scanptr.p->scanTcWaiting = cLqhTimeOutCount;
 
   /* ------------------------------------------------------------------
    * If close flag is set this scan should be closed
@@ -8453,6 +8456,8 @@ void Dblqh::scanLockReleasedLab(Signal* 
   tcConnectptr.i = scanptr.p->scanTcrec;
   ptrCheckGuard(tcConnectptr, ctcConnectrecFileSize, tcConnectionrec);  
 
+  check_send_scan_hb_rep(signal, scanptr.p, tcConnectptr.p);
+
   if (scanptr.p->scanReleaseCounter == scanptr.p->m_curr_batch_size_rows) {
     if ((scanptr.p->scanErrorCounter > 0) ||
         (scanptr.p->scanCompletedStatus == ZTRUE)) {
@@ -8845,44 +8850,58 @@ void Dblqh::abort_scan(Signal* signal, U
 /* We include the scanPtr.i that comes from ACC in signalData[1], this */
 /* tells TC which fragment record to check for a timeout.              */
 /*---------------------------------------------------------------------*/
-void Dblqh::execSCAN_HBREP(Signal* signal)
+void
+Dblqh::check_send_scan_hb_rep(Signal* signal, 
+                              ScanRecord* scanPtrP,
+                              TcConnectionrec* tcPtrP)
 {
-  jamEntry();
-  scanptr.i = signal->theData[0];
-  c_scanRecordPool.getPtr(scanptr);
-  switch(scanptr.p->scanType){
+  switch(scanPtrP->scanType){
   case ScanRecord::SCAN:
-    if (scanptr.p->scanTcWaiting == ZTRUE) {
-      jam();
-      tcConnectptr.i = scanptr.p->scanTcrec;  
-      ptrCheckGuard(tcConnectptr, ctcConnectrecFileSize, tcConnectionrec);
-
-      ptrCheckGuard(tcConnectptr, ctcConnectrecFileSize, tcConnectionrec);
-      const Uint32 transid1  = signal->theData[1];
-      const Uint32 transid2  = signal->theData[2];
-      ndbrequire(transid1 == tcConnectptr.p->transid[0] && 
-		 transid2 == tcConnectptr.p->transid[1]);
-
-      // Update counter on tcConnectPtr
-      if (tcConnectptr.p->tcTimer != 0){
-	tcConnectptr.p->tcTimer = cLqhTimeOutCount;
-      } else {
-        jam();
-	//ndbout << "SCAN_HBREP when tcTimer was off" << endl;	
-      }
-      
-      signal->theData[0] = tcConnectptr.p->clientConnectrec;
-      signal->theData[1] = tcConnectptr.p->transid[0];
-      signal->theData[2] = tcConnectptr.p->transid[1];
-      sendSignal(tcConnectptr.p->clientBlockref,
-                 GSN_SCAN_HBREP, signal, 3, JBB);
-    }//if
     break;
   case ScanRecord::COPY:
-    //    ndbout << "Dblqh::execSCAN_HBREP Dropping SCAN_HBREP" << endl;
-    break;
+    return;
+#ifdef NDEBUG
+  case ScanRecord::ST_IDLE:
   default:
+    return;
+#else
+  case ScanRecord::ST_IDLE:
     ndbrequire(false);
+#endif
+  }
+
+  Uint64 now = cLqhTimeOutCount;         // measure in 10ms
+  Uint64 last = scanPtrP->scanTcWaiting; // last time we reported to TC (10ms)
+  Uint64 timeout = cTransactionDeadlockDetectionTimeout; // (ms)
+  Uint64 limit = (3*timeout) / 4;
+
+  bool alarm = 
+    now >= ((10 * last + limit) / 10) || now < last; // wrap
+    
+  if (alarm)
+  {
+    jam();
+
+    scanPtrP->scanTcWaiting = Uint32(now);
+    if (tcPtrP->tcTimer != 0)
+    {
+      tcPtrP->tcTimer = Uint32(now);
+    }      
+
+    Uint32 save[3];
+    save[0] = signal->theData[0];
+    save[1] = signal->theData[1];
+    save[2] = signal->theData[2];
+
+    signal->theData[0] = tcPtrP->clientConnectrec;
+    signal->theData[1] = tcPtrP->transid[0];
+    signal->theData[2] = tcPtrP->transid[1];
+    sendSignal(tcPtrP->clientBlockref,
+               GSN_SCAN_HBREP, signal, 3, JBB);
+
+    signal->theData[0] = save[0];
+    signal->theData[1] = save[1];
+    signal->theData[2] = save[2];
   }
 }
 
@@ -8891,6 +8910,7 @@ void Dblqh::accScanConfScanLab(Signal* s
   AccScanConf * const accScanConf = (AccScanConf *)&signal->theData[0];
   tcConnectptr.i = scanptr.p->scanTcrec;
   ptrCheckGuard(tcConnectptr, ctcConnectrecFileSize, tcConnectionrec);
+
   /* -----------------------------------------------------------------------
    *       PRECONDITION: SCAN_STATE = WAIT_ACC_SCAN
    * ----------------------------------------------------------------------- */
@@ -8903,6 +8923,9 @@ void Dblqh::accScanConfScanLab(Signal* s
     tupScanCloseConfLab(signal);
     return;
   }//if
+
+  check_send_scan_hb_rep(signal, scanptr.p, tcConnectptr.p);
+
   scanptr.p->scanAccPtr = accScanConf->accPtr;
   if (scanptr.p->rangeScan) {
     jam();
@@ -9165,6 +9188,7 @@ void Dblqh::execCHECK_LCP_STOP(Signal* s
   tcConnectptr.i = scanptr.p->scanTcrec;
   ptrCheckGuard(tcConnectptr, ctcConnectrecFileSize, tcConnectionrec);
   fragptr.i = tcConnectptr.p->fragmentptr;
+
   c_fragment_pool.getPtr(fragptr);
   if (signal->theData[1] == ZTRUE) {
     jam();
@@ -9230,6 +9254,7 @@ void Dblqh::nextScanConfScanLab(Signal* 
   NextScanConf * const nextScanConf = (NextScanConf *)&signal->theData[0];
   tcConnectptr.i = scanptr.p->scanTcrec;
   ptrCheckGuard(tcConnectptr, ctcConnectrecFileSize, tcConnectionrec);
+
   if (nextScanConf->fragId == RNIL) {
     jam();
     /* ---------------------------------------------------------------------
@@ -9310,7 +9335,9 @@ void Dblqh::nextScanConfScanLab(Signal* 
                GSN_ACC_CHECK_SCAN, signal, 2, JBB);
     return;
   }//if
+
   jam();
+  check_send_scan_hb_rep(signal, scanptr.p, tcConnectptr.p);
   set_acc_ptr_in_scan_record(scanptr.p,
                              scanptr.p->m_curr_batch_size_rows,
                              accOpPtr);
@@ -9693,8 +9720,10 @@ void Dblqh::scanTupkeyRefLab(Signal* sig
     return;
   }//if
   Uint32 time_passed= tcConnectptr.p->tcTimer - cLqhTimeOutCount;
-  if (rows) {
-    if (time_passed > 1) {
+  if (rows) 
+  {
+    if (time_passed > 1) 
+    {
   /* -----------------------------------------------------------------------
    *  WE NEED TO ENSURE THAT WE DO NOT SEARCH FOR THE NEXT TUPLE FOR A 
    *  LONG TIME WHILE WE KEEP A LOCK ON A FOUND TUPLE. WE RATHER REPORT 
@@ -9705,15 +9734,8 @@ void Dblqh::scanTupkeyRefLab(Signal* sig
       scanReleaseLocksLab(signal);
       return;
     }
-  } else {
-    if (time_passed > 10) {
-      jam();
-      signal->theData[0]= scanptr.i;
-      signal->theData[1]= tcConnectptr.p->transid[0];
-      signal->theData[2]= tcConnectptr.p->transid[1];
-      execSCAN_HBREP(signal);
-    }
   }
+
   scanptr.p->scanFlag = NextScanReq::ZSCAN_NEXT_ABORT;
   scanNextLoopLab(signal);
 }//Dblqh::scanTupkeyRefLab()
@@ -9882,7 +9904,7 @@ Uint32 Dblqh::initScanrec(const ScanFrag
   scanptr.p->scanState = ScanRecord::SCAN_FREE;
   scanptr.p->scanFlag = ZFALSE;
   scanptr.p->m_row_id.setNull();
-  scanptr.p->scanTcWaiting = ZTRUE;
+  scanptr.p->scanTcWaiting = cLqhTimeOutCount;
   scanptr.p->scanNumber = ~0;
   scanptr.p->scanApiOpPtr = scanFragReq->clientOpPtr;
   scanptr.p->m_last_row = 0;
@@ -10120,7 +10142,7 @@ void Dblqh::releaseScanrec(Signal* signa
 {
   scanptr.p->scanState = ScanRecord::SCAN_FREE;
   scanptr.p->scanType = ScanRecord::ST_IDLE;
-  scanptr.p->scanTcWaiting = ZFALSE;
+  scanptr.p->scanTcWaiting = 0;
   cbookedAccOps -= scanptr.p->m_max_batch_size_rows;
   cscanNoFreeRec++;
 }//Dblqh::releaseScanrec()
@@ -10242,7 +10264,7 @@ void Dblqh::sendScanFragConf(Signal* sig
 {
   Uint32 completed_ops= scanptr.p->m_curr_batch_size_rows;
   Uint32 total_len= scanptr.p->m_curr_batch_size_bytes;
-  scanptr.p->scanTcWaiting = ZFALSE;
+  scanptr.p->scanTcWaiting = 0;
 
   if(ERROR_INSERTED(5037)){
     CLEAR_ERROR_INSERT_VALUE;
@@ -17389,7 +17411,7 @@ void Dblqh::initialiseScanrec(Signal* si
     refresh_watch_dog();
     scanptr.p->scanType = ScanRecord::ST_IDLE;
     scanptr.p->scanState = ScanRecord::SCAN_FREE;
-    scanptr.p->scanTcWaiting = ZFALSE;
+    scanptr.p->scanTcWaiting = 0;
     scanptr.p->nextHash = RNIL;
     scanptr.p->prevHash = RNIL;
     scanptr.p->scan_acc_index= 0;

=== modified file 'storage/ndb/src/kernel/blocks/qmgr/Qmgr.hpp'
--- a/storage/ndb/src/kernel/blocks/qmgr/Qmgr.hpp	2009-02-18 14:29:58 +0000
+++ b/storage/ndb/src/kernel/blocks/qmgr/Qmgr.hpp	2009-04-05 20:56:43 +0000
@@ -433,7 +433,6 @@ private:
   UintR cfailureNr;
 
   QmgrState ctoStatus;
-  UintR cLqhTimeSignalCount;
   bool cHbSent;
   NDB_TICKS clatestTransactionCheck;
 

=== modified file 'storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp'
--- a/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp	2009-03-15 10:03:02 +0000
+++ b/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp	2009-04-05 20:56:43 +0000
@@ -2238,8 +2238,6 @@ void Qmgr::initData(Signal* signal) 
   interface_check_timer.reset();
   clatestTransactionCheck = 0;
 
-  cLqhTimeSignalCount = 0;
-
   // catch-all for missing initializations
   memset(&arbitRec, 0, sizeof(arbitRec));
 
@@ -2378,11 +2376,7 @@ void Qmgr::timerHandlingLab(Signal* sign
       jam();
       clatestTransactionCheck += (NDB_TICKS)10;
       sendSignal(DBTC_REF, GSN_TIME_SIGNAL, signal, 1, JBB);
-      cLqhTimeSignalCount++;
-      if (cLqhTimeSignalCount >= 100) {
-	cLqhTimeSignalCount = 0;
-	sendSignal(DBLQH_REF, GSN_TIME_SIGNAL, signal, 1, JBB);          
-      }//if
+      sendSignal(DBLQH_REF, GSN_TIME_SIGNAL, signal, 1, JBB);          
       counter++;
       if (counter > 1) {
 	jam();

Thread
bzr commit into mysql-5.1-telco-6.2 branch (jonas:2899) Bug#44099Jonas Oreland5 Apr