List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:October 13 2011 9:52am
Subject:bzr push into mysql-5.1-telco-7.0 branch (jonas.oreland:4595 to 4596)
View as plain text  
 4596 Jonas Oreland	2011-10-13
      ndb - ndb - review comment move ndbinfo_send_row out of ndbinfo_write_X

    modified:
      storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp
      storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
      storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp
      storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
 4595 Mauritz Sundell	2011-10-13
      ndb - move helper methods from entry class to super class for DLHashTable
      
        To enable multiple hash tables on same object the helper methods
        equal() and hashValue() need to be different not only the linked
        list members (nextHash, prevHash).
      
        Moving the methods from entry class, T, to superclass, U. All used
        instances of DLHashTable used U=T so no change in function is
        expected.

    modified:
      storage/ndb/src/kernel/vm/DLHashTable.hpp
=== modified file 'storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp	2011-10-11 08:11:15 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp	2011-10-13 09:51:01 +0000
@@ -2687,10 +2687,7 @@ private:
 
   bool validate_filter(Signal*);
   bool match_and_print(Signal*, Ptr<TcConnectionrec>);
-  void ndbinfo_write_op(Signal* signal,
-                        DbinfoScanReq * req,
-                        Ndbinfo::Ratelimit * rl,
-                        TcConnectionrecPtr tcPtr);
+  void ndbinfo_write_op(Ndbinfo::Row&, TcConnectionrecPtr tcPtr);
 
   void define_backup(Signal*);
   void execDEFINE_BACKUP_REF(Signal*);

=== modified file 'storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2011-10-11 08:11:15 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2011-10-13 09:51:01 +0000
@@ -23422,7 +23422,9 @@ void Dblqh::execDBINFO_SCANREQ(Signal *s
       {
         jam();
         ptrCheckGuard(tcPtr, ctcConnectrecFileSize, tcConnectionrec);
-        ndbinfo_write_op(signal, &req, &rl, tcPtr);
+        Ndbinfo::Row row(signal, req);
+        ndbinfo_write_op(row, tcPtr);
+        ndbinfo_send_row(signal, req, row, rl);
         tcPtr.i = tcPtr.p->nextHashRec;
       }
       bucket++;
@@ -23437,12 +23439,8 @@ void Dblqh::execDBINFO_SCANREQ(Signal *s
 }
 
 void
-Dblqh::ndbinfo_write_op(Signal* signal,
-                        DbinfoScanReq * req,
-                        Ndbinfo::Ratelimit * rl,
-                        TcConnectionrecPtr tcPtr)
+Dblqh::ndbinfo_write_op(Ndbinfo::Row & row, TcConnectionrecPtr tcPtr)
 {
-  Ndbinfo::Row row(signal, *req);
   row.write_uint32(getOwnNodeId());
   row.write_uint32(instance());          // block instance
   row.write_uint32(tcPtr.i);             // objid
@@ -23511,8 +23509,6 @@ Dblqh::ndbinfo_write_op(Signal* signal,
     row.write_uint32(tcPtr.p->transactionState);
     row.write_uint32(0);
   }
-
-  ndbinfo_send_row(signal, *req, row, *rl);
 }
 
 

=== modified file 'storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp'
--- a/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp	2011-10-07 14:34:14 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp	2011-10-13 09:51:01 +0000
@@ -1986,10 +1986,7 @@ private:
 
   bool validate_filter(Signal*);
   bool match_and_print(Signal*, ApiConnectRecordPtr);
-  void ndbinfo_write_trans(Signal* signal,
-                           DbinfoScanReq * req,
-                           Ndbinfo::Ratelimit * rl,
-                           ApiConnectRecordPtr transPtr);
+  bool ndbinfo_write_trans(Ndbinfo::Row&, ApiConnectRecordPtr);
 
 #ifdef ERROR_INSERT
   bool testFragmentDrop(Signal* signal);

=== modified file 'storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2011-10-07 14:34:14 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2011-10-13 09:51:01 +0000
@@ -13295,7 +13295,12 @@ void Dbtc::execDBINFO_SCANREQ(Signal *si
     for (Uint32 i = 0; i < maxloop; i++)
     {
       ptrCheckGuard(ptr, capiConnectFilesize, apiConnectRecord);
-      ndbinfo_write_trans(signal, &req, &rl, ptr);
+      Ndbinfo::Row row(signal, req);
+      if (ndbinfo_write_trans(row, ptr))
+      {
+        jam();
+        ndbinfo_send_row(signal, req, row, rl);
+      }
 
       ptr.i ++;
       if (ptr.i == capiConnectFilesize)
@@ -13318,11 +13323,8 @@ done:
   ndbinfo_send_scan_conf(signal, req, rl);
 }
 
-void
-Dbtc::ndbinfo_write_trans(Signal* signal,
-                          DbinfoScanReq * req,
-                          Ndbinfo::Ratelimit * rl,
-                          ApiConnectRecordPtr transPtr)
+bool
+Dbtc::ndbinfo_write_trans(Ndbinfo::Row & row, ApiConnectRecordPtr transPtr)
 {
   Uint32 conState = transPtr.p->apiConnectstate;
 
@@ -13338,7 +13340,7 @@ Dbtc::ndbinfo_write_trans(Signal* signal
       conState == CS_DISCONNECTED ||
       conState == CS_RESTART)
   {
-    return;
+    return false;
   }
 
   char transid[64];
@@ -13347,7 +13349,6 @@ Dbtc::ndbinfo_write_trans(Signal* signal
                        transPtr.p->transid[0],
                        transPtr.p->transid[1]);
 
-  Ndbinfo::Row row(signal, *req);
   row.write_uint32(getOwnNodeId());
   row.write_uint32(instance());   // block instance
   row.write_uint32(transPtr.i);
@@ -13404,7 +13405,7 @@ Dbtc::ndbinfo_write_trans(Signal* signal
 
   Uint32 apiTimer = getApiConTimer(transPtr.i);
   row.write_uint32(apiTimer ? (ctcTimer - apiTimer) / 100 : 0);
-  ndbinfo_send_row(signal, *req, row, *rl);
+  return true;
 }
 
 bool

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.0 branch (jonas.oreland:4595 to 4596) Jonas Oreland13 Oct