List:Commits« Previous MessageNext Message »
From:Frazer Clement Date:April 24 2012 3:20pm
Subject:bzr push into mysql-5.5-cluster-7.2 branch (frazer.clement:3897 to 3898)
View as plain text  
 3898 Frazer Clement	2012-04-24 [merge]
      Merge 7.1->7.2

    modified:
      storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
      storage/ndb/src/kernel/vm/ArrayPool.hpp
 3897 Frazer Clement	2012-04-24 [merge]
      Merge 7.1->7.2

    modified:
      storage/ndb/include/kernel/signaldata/DihScanTab.hpp
      storage/ndb/include/kernel/signaldata/DumpStateOrd.hpp
      storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
      storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp
      storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
      storage/ndb/test/ndbapi/testScan.cpp
      storage/ndb/test/run-test/daily-basic-tests.txt
=== modified file 'storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2012-03-28 14:49:58 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2012-04-24 15:17:46 +0000
@@ -22796,7 +22796,7 @@ Dblqh::execDUMP_STATE_ORD(Signal* signal
 
     ScanRecordPtr sp;
     sp.i = recordNo;
-    c_scanRecordPool.getPtr(sp);
+    c_scanRecordPool.getPtrIgnoreAlloc(sp);
     infoEvent("Dblqh::ScanRecord[%d]: state=%d, type=%d, "
 	      "complStatus=%d, scanNodeId=%d",
 	      sp.i,
@@ -22826,6 +22826,10 @@ Dblqh::execDUMP_STATE_ORD(Signal* signal
 	      sp.p->scanTcWaiting,
 	      sp.p->scanTcrec,
 	      sp.p->scanKeyinfoFlag);
+    infoEvent(" LcpScan=%d  RowId(%u:%u)",
+              sp.p->lcpScan,
+              sp.p->m_row_id.m_page_no,
+              sp.p->m_row_id.m_page_idx);
     return;
   }
   if(dumpState->args[0] == DumpStateOrd::LqhDumpLcpState){
@@ -22853,6 +22857,28 @@ Dblqh::execDUMP_STATE_ORD(Signal* signal
     infoEvent(" m_EMPTY_LCP_REQ=%s",
 	      TlcpPtr.p->m_EMPTY_LCP_REQ.getText(buf));
     
+    if ((signal->length() == 2) &&
+        (dumpState->args[1] == 0))
+    {
+      /* Dump reserved LCP scan rec */
+      /* As there's only one, we'll do a tight loop here */
+      infoEvent(" dumping reserved scan records");
+      for (Uint32 rec=0; rec < cscanrecFileSize; rec++)
+      {
+        ScanRecordPtr sp;
+        sp.i = rec;
+        c_scanRecordPool.getPtrIgnoreAlloc(sp);
+
+        if (sp.p->m_reserved &&
+            sp.p->lcpScan)
+        {
+          dumpState->args[0] = DumpStateOrd::LqhDumpOneScanRec;
+          dumpState->args[1] = rec;
+          execDUMP_STATE_ORD(signal);
+        }
+      }
+    }
+
     return;
   }
   if (dumpState->args[0] == DumpStateOrd::LQHLogFileInitStatus){

=== modified file 'storage/ndb/src/kernel/vm/ArrayPool.hpp'
--- a/storage/ndb/src/kernel/vm/ArrayPool.hpp	2012-01-11 18:28:28 +0000
+++ b/storage/ndb/src/kernel/vm/ArrayPool.hpp	2012-04-24 15:17:46 +0000
@@ -99,6 +99,7 @@ public:
   void getPtr(ConstPtr<T> &) const;
   void getPtr(Ptr<T> &, bool CrashOnBoundaryError);
   void getPtr(ConstPtr<T> &, bool CrashOnBoundaryError) const;
+  void getPtrIgnoreAlloc(Ptr<T> &);
   
   /**
    * Get pointer for i value
@@ -723,6 +724,26 @@ ArrayPool<T>::getConstPtr(Uint32 i, bool
     return 0;
   }
 }
+
+/**
+   getPtrIgnoreAlloc
+
+   getPtr, without array_guard /theAllocatedBitmask checks
+   Useful when looking at elements in the pool which may or may not
+   be allocated.
+   Retains the range check.
+*/
+template <class T>
+inline
+void
+ArrayPool<T>::getPtrIgnoreAlloc(Ptr<T> & ptr){
+  Uint32 i = ptr.i;
+  if(likely (i < size)){
+    ptr.p = &theArray[i];
+  } else {
+    ErrorReporter::handleAssert("ArrayPool<T>::getPtr", __FILE__, __LINE__);
+  }
+}
   
 /**
  * Allocate an object from pool - update Ptr

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5-cluster-7.2 branch (frazer.clement:3897 to 3898) Frazer Clement25 Apr