List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:October 4 2010 8:56am
Subject:bzr push into mysql-5.1-telco-7.1 branch (jonas:3862 to 3863)
View as plain text  
 3863 Jonas Oreland	2010-10-04 [merge]
      ndb - merge 70 to 71

    modified:
      storage/ndb/src/ndbapi/ClusterMgr.cpp
      storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
 3862 Martin Zaun	2010-10-02 [merge]
      crund - cosmetics

    modified:
      storage/ndb/test/crund/tws_benchmark/src/Main.java
=== modified file 'storage/ndb/src/ndbapi/ClusterMgr.cpp'
--- a/storage/ndb/src/ndbapi/ClusterMgr.cpp	2010-10-01 11:43:32 +0000
+++ b/storage/ndb/src/ndbapi/ClusterMgr.cpp	2010-10-04 08:31:18 +0000
@@ -451,6 +451,7 @@ ClusterMgr::trp_deliver_signal(const Ndb
       Uint32 aNodeId= refToNode(ref);
       tSignal.theReceiversBlockNumber= refToBlock(ref);
       tSignal.theVerId_signalNumber= GSN_SUB_GCP_COMPLETE_ACK;
+      tSignal.theSendersBlockRef = API_CLUSTERMGR;
       theFacade.sendSignalUnCond(&tSignal, aNodeId);
     }
     break;

=== modified file 'storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp'
--- a/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp	2010-09-30 09:32:28 +0000
+++ b/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp	2010-10-04 08:52:52 +0000
@@ -39,6 +39,7 @@
 #include <EventLogger.hpp>
 extern EventLogger * g_eventLogger;
 
+#define TOTAL_BUCKETS_INIT (1 << 15)
 static Gci_container_pod g_empty_gci_container;
 
 #if defined(VM_TRACE) && defined(NOT_USED)
@@ -588,6 +589,18 @@ NdbEventOperationImpl::execute_nolock()
     DBUG_RETURN(-1);
   }
 
+  bool schemaTrans = false;
+  if (m_ndb->theEventBuffer->m_total_buckets == TOTAL_BUCKETS_INIT)
+  {
+    int res = myDict->beginSchemaTrans();
+    if (res != 0)
+    {
+      m_error.code= myDict->getNdbError().code;
+      DBUG_RETURN(-1);
+    }
+    schemaTrans = true;
+  }
+
   if (theFirstPkAttrs[0] == NULL && 
       theFirstDataAttrs[0] == NULL) { // defaults to get all
   }
@@ -613,6 +626,11 @@ NdbEventOperationImpl::execute_nolock()
       buckets = m_ndb->theImpl->theNoOfDBnodes;
 
     m_ndb->theEventBuffer->set_total_buckets(buckets);
+    if (schemaTrans)
+    {
+      schemaTrans = false;
+      myDict->endSchemaTrans(1);
+    }
 
     if (theMainOp == NULL) {
       DBUG_PRINT("info", ("execute blob ops"));
@@ -646,6 +664,13 @@ NdbEventOperationImpl::execute_nolock()
   m_magic_number= 0;
   m_error.code= myDict->getNdbError().code;
   m_ndb->theEventBuffer->remove_op();
+
+  if (schemaTrans)
+  {
+    schemaTrans = false;
+    myDict->endSchemaTrans(1);
+  }
+
   DBUG_RETURN(r);
 }
 
@@ -1056,8 +1081,6 @@ NdbEventOperationImpl::printAll()
  * Class NdbEventBuffer
  * Each Ndb object has a Object.
  */
-#define TOTAL_BUCKETS_INIT (1 << 15)
-
 NdbEventBuffer::NdbEventBuffer(Ndb *ndb) :
   m_total_buckets(TOTAL_BUCKETS_INIT), 
   m_min_gci_index(0),


Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20101004085552-y927idxi1olchq8s.bundle
Thread
bzr push into mysql-5.1-telco-7.1 branch (jonas:3862 to 3863) Jonas Oreland4 Oct