List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:March 20 2009 8:32am
Subject:bzr commit into mysql-5.1-telco-6.3 branch (jonas:2910) Bug#43754
View as plain text  
#At file:///home/jonas/src/telco-6.3/

 2910 Jonas Oreland	2009-03-20
      ndb - bug#43754 - fix spurious 723 when createEventOperation during node-failure
modified:
  storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
  storage/ndb/test/ndbapi/test_event.cpp

=== modified file 'storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2009-03-19 16:50:56 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2009-03-20 08:31:52 +0000
@@ -9865,6 +9865,15 @@ Dbdict::execCREATE_EVNT_REQ(Signal* sign
     jam();
     EVENT_TRACE;
     releaseSections(handle);
+
+    if (ERROR_INSERTED(6023))
+    {
+      jam();
+      signal->theData[0] = 9999;
+      sendSignalWithDelay(CMVMI_REF, GSN_NDB_TAMPER, signal, 1000, 1);
+      return;
+    }
+
     createEvent_RT_DICT_AFTER_GET(signal, evntRecPtr);
     return;
   }
@@ -10537,15 +10546,44 @@ void Dbdict::execCREATE_EVNT_REF(Signal*
   ndbout_c("DBDICT(Coordinator) got GSN_CREATE_EVNT_REF evntRecPtr.i = (%d)", evntRecPtr.i);
 #endif
 
-  if (ref->errorCode == CreateEvntRef::NF_FakeErrorREF){
+  LinearSectionPtr ptr[1];
+
+  int noLSP = 0;
+  LinearSectionPtr *ptr0 = NULL;
+  if (ref->errorCode == CreateEvntRef::NF_FakeErrorREF)
+  {
     jam();
-    evntRecPtr.p->m_reqTracker.ignoreRef(c_counterMgr, refToNode(ref->senderRef));
-  } else {
+    evntRecPtr.p->m_reqTracker.ignoreRef(c_counterMgr, 
+                                         refToNode(ref->senderRef));
+
+    /**
+     * If a CREATE_EVNT_REF finishes request,
+     *   we need to make sure that table name is sent
+     *   same as it is if a CREATE_EVNT_CONF finishes request
+     */
+    if (evntRecPtr.p->m_reqTracker.done())
+    {
+      jam();
+      /**
+       * Add "extra" check if tracker is done...
+       *   (strictly not necessary...)
+       *   but makes case more explicit
+       */
+      ptr[0].p = (Uint32 *)evntRecPtr.p->m_eventRec.TABLE_NAME;
+      ptr[0].sz = (strlen(evntRecPtr.p->m_eventRec.TABLE_NAME)+4)/4;
+      ptr0 = ptr;
+      noLSP = 1;
+    }
+  }
+  else 
+  {
     jam();
     evntRecPtr.p->m_errorCode = ref->errorCode;
-    evntRecPtr.p->m_reqTracker.reportRef(c_counterMgr, refToNode(ref->senderRef));
+    evntRecPtr.p->m_reqTracker.reportRef(c_counterMgr, 
+                                         refToNode(ref->senderRef));
   }
-  createEvent_sendReply(signal, evntRecPtr);
+
+  createEvent_sendReply(signal, evntRecPtr, ptr0, noLSP);
 
   return;
 }

=== modified file 'storage/ndb/test/ndbapi/test_event.cpp'
--- a/storage/ndb/test/ndbapi/test_event.cpp	2009-03-19 16:51:19 +0000
+++ b/storage/ndb/test/ndbapi/test_event.cpp	2009-03-20 08:31:52 +0000
@@ -2420,13 +2420,14 @@ runNFSubscribe(NDBT_Context* ctx, NDBT_S
   }
 
   int codes[] = {
-    13013,
-    13019,
-    13020,
-    13041,
-    0,
+    6023,  (int)NdbRestarter::NS_NON_MASTER,
+    13013, (int)NdbRestarter::NS_RANDOM,
+    13019, (int)NdbRestarter::NS_RANDOM,
+    13020, (int)NdbRestarter::NS_RANDOM,
+    13041, (int)NdbRestarter::NS_RANDOM,
+    0
   };
-
+  
   int nr_codes[] = {
     13039,
     13040,
@@ -2440,13 +2441,14 @@ runNFSubscribe(NDBT_Context* ctx, NDBT_S
     int i = 0;
     while (codes[i] != 0)
     {
-      int nodeId = restarter.getDbNodeId(rand() % restarter.getNumDbNodes());
+      int code = codes[i++];
+      int nodeId = restarter.getNode((NdbRestarter::NodeSelector)codes[i++]);
       int val2[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 1 };
       if (restarter.dumpStateOneNode(nodeId, val2, 2))
         return NDBT_FAILED;
       
-      ndbout_c("Node %u error: %u", nodeId, codes[i]);
-      if (restarter.insertErrorInNode(nodeId, codes[i]))
+      ndbout_c("Node %u error: %u", nodeId, code);
+      if (restarter.insertErrorInNode(nodeId, code))
         return NDBT_FAILED;
       
       if (restarter.waitNodesNoStart(&nodeId, 1))
@@ -2457,8 +2459,6 @@ runNFSubscribe(NDBT_Context* ctx, NDBT_S
       
       if (restarter.waitClusterStarted())
         return NDBT_FAILED;
-      
-      i++;
     }
     
     int nodeId = restarter.getDbNodeId(rand() % restarter.getNumDbNodes());

Thread
bzr commit into mysql-5.1-telco-6.3 branch (jonas:2910) Bug#43754Jonas Oreland20 Mar