List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:December 19 2011 1:59pm
Subject:bzr push into mysql-5.1-telco-7.0 branch (jonas.oreland:4756 to 4757)
View as plain text  
 4757 Jonas Oreland	2011-12-19
      ndb - remove c_ssIdSeq as concept
        use position in array instead (which removes theoretical possibility of
        duplicate ssId's)

    modified:
      storage/ndb/src/kernel/blocks/LocalProxy.cpp
      storage/ndb/src/kernel/blocks/LocalProxy.hpp
 4756 Pekka Nousiainen	2011-12-19 [merge]
      merge 7.0 into wl#4124

    modified:
      mysql-test/suite/ndb/r/ndb_alter_table_online2.result
      mysql-test/suite/ndb/t/ndb_alter_table_online2.test
      storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
      storage/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp
      storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
      storage/ndb/src/mgmsrv/MgmtSrvr.cpp
      storage/ndb/test/include/NDBT_Test.hpp
      storage/ndb/test/include/NdbRestarts.hpp
      storage/ndb/test/ndbapi/testDict.cpp
      storage/ndb/test/ndbapi/testNodeRestart.cpp
      storage/ndb/test/run-test/atrt.hpp
      storage/ndb/test/run-test/daily-basic-tests.txt
      storage/ndb/test/run-test/daily-perf-tests.txt
      storage/ndb/test/run-test/db.cpp
      storage/ndb/test/run-test/main.cpp
      storage/ndb/test/run-test/test-tests.txt
      storage/ndb/test/src/NDBT_Test.cpp
      storage/ndb/test/src/NdbRestarts.cpp
=== modified file 'storage/ndb/src/kernel/blocks/LocalProxy.cpp'
--- a/storage/ndb/src/kernel/blocks/LocalProxy.cpp	2011-10-07 08:07:21 +0000
+++ b/storage/ndb/src/kernel/blocks/LocalProxy.cpp	2011-12-19 13:58:28 +0000
@@ -27,8 +27,6 @@ LocalProxy::LocalProxy(BlockNumber block
   for (i = 0; i < MaxWorkers; i++)
     c_worker[i] = 0;
 
-  c_ssIdSeq = 0;
-
   c_typeOfStart = NodeState::ST_ILLEGAL_TYPE;
   c_masterNodeId = ZNIL;
 

=== modified file 'storage/ndb/src/kernel/blocks/LocalProxy.hpp'
--- a/storage/ndb/src/kernel/blocks/LocalProxy.hpp	2011-10-07 08:07:21 +0000
+++ b/storage/ndb/src/kernel/blocks/LocalProxy.hpp	2011-12-19 13:58:28 +0000
@@ -192,11 +192,17 @@ protected:
 
   template <class Ss>
   Ss& ssSeize() {
-    const Uint32 base = SsIdBase;
-    const Uint32 mask = ~base;
-    const Uint32 ssId = base | c_ssIdSeq;
-    c_ssIdSeq = (c_ssIdSeq + 1) & mask;
-    return ssSeize<Ss>(ssId);
+    SsPool<Ss>& sp = Ss::pool(this);
+    Ss* ssptr = ssSearch<Ss>(0);
+    ndbrequire(ssptr != 0);
+    // Use position in array as ssId
+    UintPtr pos = ssptr - sp.m_pool;
+    Uint32 ssId = Uint32(pos) + 1;
+    new (ssptr) Ss;
+    ssptr->m_ssId = ssId;
+    sp.m_usage++;
+    D("ssSeize()" << V(sp.m_usage) << hex << V(ssId) << " " << Ss::name());
+    return *ssptr;
   }
 
   template <class Ss>

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.0 branch (jonas.oreland:4756 to 4757) Jonas Oreland19 Dec