List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:September 27 2011 6:46am
Subject:bzr push into mysql-5.1-telco-7.0 branch (jonas.oreland:4552 to 4553)
View as plain text  
 4553 Jonas Oreland	2011-09-27
      ndb - remove mutex created as global object (before ndb_init), have it be created by EmulatorData::create() instead

    modified:
      storage/ndb/src/kernel/vm/ArrayPool.hpp
      storage/ndb/src/kernel/vm/Emulator.cpp
 4552 jonas oreland	2011-09-27
      ndb - This patch adds a few new NdbClusterConnectionConnect tests, and adds them to daily-basic

    modified:
      storage/ndb/test/ndbapi/testNdbApi.cpp
      storage/ndb/test/run-test/daily-basic-tests.txt
=== modified file 'storage/ndb/src/kernel/vm/ArrayPool.hpp'
--- a/storage/ndb/src/kernel/vm/ArrayPool.hpp	2011-06-30 15:59:25 +0000
+++ b/storage/ndb/src/kernel/vm/ArrayPool.hpp	2011-09-27 06:44:06 +0000
@@ -1385,7 +1385,7 @@ UnsafeArrayPool<T>::getPtrForce(ConstPtr
 template <class T>
 class SafeArrayPool : public ArrayPool<T> {
 public:
-  SafeArrayPool(NdbMutex* mutex = 0);
+  SafeArrayPool();
   ~SafeArrayPool();
   int lock();
   int unlock();
@@ -1393,6 +1393,8 @@ public:
   void release(Uint32 i);
   void release(Ptr<T>&);
 
+  void setMutex(NdbMutex* mutex = 0);
+
 private:
   NdbMutex* m_mutex;
   bool m_mutex_owner;
@@ -1403,7 +1405,16 @@ private:
 
 template <class T>
 inline
-SafeArrayPool<T>::SafeArrayPool(NdbMutex* mutex)
+SafeArrayPool<T>::SafeArrayPool()
+{
+  m_mutex = 0;
+  m_mutex_owner = false;
+}
+
+template <class T>
+inline
+void
+SafeArrayPool<T>::setMutex(NdbMutex* mutex)
 {
   if (mutex != 0) {
     m_mutex = mutex;

=== modified file 'storage/ndb/src/kernel/vm/Emulator.cpp'
--- a/storage/ndb/src/kernel/vm/Emulator.cpp	2011-06-30 15:59:25 +0000
+++ b/storage/ndb/src/kernel/vm/Emulator.cpp	2011-09-27 06:44:06 +0000
@@ -89,6 +89,7 @@ EmulatorData::create(){
   theSimBlockList  = new SimBlockList();
   m_socket_server  = new SocketServer();
   m_mem_manager    = new Ndbd_mem_manager();
+  globalData.m_global_page_pool.setMutex();
 
   if (theConfiguration == NULL ||
       theWatchDog == NULL ||

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.0 branch (jonas.oreland:4552 to 4553) Jonas Oreland29 Sep