List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:November 24 2010 12:19pm
Subject:bzr push into mysql-5.1-telco-7.1 branch (jonas:3989 to 3990)
View as plain text  
 3990 Jonas Oreland	2010-11-24 [merge]
      ndb merge 70 to 71

    modified:
      storage/ndb/src/kernel/blocks/ERROR_codes.txt
      storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
      storage/ndb/test/ndbapi/testNodeRestart.cpp
      storage/ndb/test/run-test/daily-basic-tests.txt
 3989 Martin Skold	2010-11-23 [merge]
      Merge

    modified:
      mysql-test/suite/rpl/t/disabled.def
      sql/rpl_utility.cc
=== modified file 'storage/ndb/src/kernel/blocks/ERROR_codes.txt'
--- a/storage/ndb/src/kernel/blocks/ERROR_codes.txt	2010-10-28 12:59:31 +0000
+++ b/storage/ndb/src/kernel/blocks/ERROR_codes.txt	2010-11-24 12:16:55 +0000
@@ -3,7 +3,7 @@ Next NDBCNTR 1002
 Next NDBFS 2000
 Next DBACC 3002
 Next DBTUP 4035
-Next DBLQH 5061
+Next DBLQH 5064
 Next DBDICT 6026
 Next DBDIH 7229
 Next DBTC 8088

=== modified file 'storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2010-11-01 16:11:10 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2010-11-24 12:16:55 +0000
@@ -3103,7 +3103,11 @@ void Dblqh::execPACKED_SIGNAL(Signal* si
     TcommitLen = 4;
     Tgci_lo_mask = 0;
   }
-  
+
+#ifdef ERROR_INSERT
+  Uint32 senderBlockRef = signal->getSendersBlockRef();
+#endif
+
   ndbrequire(Tlength <= 25);
   MEMCOPY_NO_WORDS(&TpackedData[0], &signal->theData[0], Tlength);
   while (Tlength > Tstep) {
@@ -3172,6 +3176,9 @@ void Dblqh::execPACKED_SIGNAL(Signal* si
       ndbrequire(false);
       return;
     }//switch
+#ifdef ERROR_INSERT
+    signal->header.theSendersBlockRef = senderBlockRef;
+#endif
   }//while
   ndbrequire(Tlength == Tstep);
   return;
@@ -7147,6 +7154,24 @@ void Dblqh::execCOMMIT(Signal* signal) 
     sendSignalWithDelay(cownref, GSN_COMMIT, signal, 2000,signal->getLength());
     return;
   }//if
+  if (ERROR_INSERTED(5062) &&
+      ((refToMain(signal->getSendersBlockRef()) == DBTC) ||
+       signal->getSendersBlockRef() == reference()))
+  {
+    Uint32 save = signal->getSendersBlockRef();
+    ndbout_c("Delaying execCOMMIT");
+    sendSignalWithDelay(cownref, GSN_COMMIT, signal, 2000, signal->getLength());
+
+    if (refToMain(save) == DBTC)
+    {
+      ndbout_c("killing %u", refToNode(save));
+      signal->theData[0] = 9999;
+      sendSignal(numberToRef(CMVMI, refToNode(save)),
+                 GSN_NDB_TAMPER, signal, 1, JBB);
+    }
+    return;
+  }
+
   tcConnectptr.i = tcIndex;
   ptrAss(tcConnectptr, regTcConnectionrec);
   if ((tcConnectptr.p->transid[0] == transid1) &&
@@ -7284,6 +7309,24 @@ void Dblqh::execCOMPLETE(Signal* signal)
     sendSignalWithDelay(cownref, GSN_COMPLETE, signal, 2000, 3);
     return;
   }//if
+  if (ERROR_INSERTED(5063) &&
+      ((refToMain(signal->getSendersBlockRef()) == DBTC) ||
+       signal->getSendersBlockRef() == reference()))
+  {
+    Uint32 save = signal->getSendersBlockRef();
+    ndbout_c("Delaying execCOMPLETE");
+    sendSignalWithDelay(cownref, GSN_COMPLETE,signal, 2000,signal->getLength());
+
+    if (refToMain(save) == DBTC)
+    {
+      ndbout_c("killing %u", refToNode(save));
+      signal->theData[0] = 9999;
+      sendSignal(numberToRef(CMVMI, refToNode(save)),
+                 GSN_NDB_TAMPER, signal, 1, JBB);
+    }
+    return;
+  }
+
   tcConnectptr.i = tcIndex;
   ptrAss(tcConnectptr, regTcConnectionrec);
   if ((tcConnectptr.p->transactionState == TcConnectionrec::COMMITTED) &&
@@ -7840,8 +7883,6 @@ void Dblqh::commitReplyLab(Signal* signa
     sendSignal(tcConnectptr.p->reqBlockref, GSN_COMMITCONF, signal, 4, JBB);
   } else {
     ndbrequire(regTcPtr->abortState == TcConnectionrec::NEW_FROM_TC);
-    jam();
-    sendLqhTransconf(signal, LqhTransConf::Committed);
   }//if
   return;
 }//Dblqh::commitReplyLab()
@@ -7894,7 +7935,6 @@ void Dblqh::completeUnusualLab(Signal* s
     sendAborted(signal);
   } else if (regTcPtr->abortState == TcConnectionrec::NEW_FROM_TC) {
     jam();
-    sendLqhTransconf(signal, LqhTransConf::Committed);
   } else {
     ndbrequire(regTcPtr->abortState == TcConnectionrec::REQ_FROM_TC);
     jam();
@@ -8356,6 +8396,7 @@ void Dblqh::abortStateHandlerLab(Signal*
 /*WE ARE ONLY CHECKING THE STATUS OF THE TRANSACTION. IT IS COMMITTING.      */
 /*COMPLETE THE COMMIT LOCALLY AND THEN SEND REPORT OF COMMITTED TO THE NEW TC*/
 /* ------------------------------------------------------------------------- */
+    sendLqhTransconf(signal, LqhTransConf::Committed);
     return;
     break;
   case TcConnectionrec::COMMITTED:
@@ -8868,6 +8909,29 @@ void Dblqh::lqhTransNextLab(Signal* sign
        * now scan markers
        */
 #ifdef ERROR_INSERT
+      if (ERROR_INSERTED(5061))
+      {
+        CLEAR_ERROR_INSERT_VALUE;
+        for (Uint32 i = 0; i < cnoOfNodes; i++)
+        {
+          Uint32 node = cnodeData[i];
+          if (node != getOwnNodeId() && cnodeStatus[i] == ZNODE_UP)
+          {
+            ndbout_c("clearing ERROR_INSERT in LQH:%u", node);
+            signal->theData[0] = 0;
+            sendSignal(numberToRef(DBLQH, node), GSN_NDB_TAMPER,
+                       signal, 1, JBB);
+          }
+        }
+        
+        signal->theData[0] = ZSCAN_MARKERS;
+        signal->theData[1] = tcNodeFailptr.i;
+        signal->theData[2] = 0;
+        signal->theData[3] = RNIL;
+        sendSignalWithDelay(cownref, GSN_CONTINUEB, signal, 5000, 4);
+        return;
+      }
+
       if (ERROR_INSERTED(5050))
       {
         ndbout_c("send ZSCAN_MARKERS with 5s delay and killing master");

=== modified file 'storage/ndb/test/ndbapi/testNodeRestart.cpp'
--- a/storage/ndb/test/ndbapi/testNodeRestart.cpp	2010-10-28 12:59:31 +0000
+++ b/storage/ndb/test/ndbapi/testNodeRestart.cpp	2010-11-24 12:16:55 +0000
@@ -4127,6 +4127,59 @@ runForceStopAndRestart(NDBT_Context* ctx
   return NDBT_OK;
 }
 
+int
+runBug58453(NDBT_Context* ctx, NDBT_Step* step)
+{
+  NdbRestarter res;
+  if (res.getNumDbNodes() < 4)
+    return NDBT_OK;
+
+  Ndb* pNdb = GETNDB(step);
+  HugoOperations hugoOps(*ctx->getTab());
+
+  int loops = ctx->getNumLoops();
+  while (loops--)
+  {
+    if (hugoOps.startTransaction(pNdb) != 0)
+      return NDBT_FAILED;
+
+    if (hugoOps.pkInsertRecord(pNdb, 0, 128 /* records */) != 0)
+      return NDBT_FAILED;
+
+    int err = 5062;
+    switch(loops & 1){
+    case 0:
+      err = 5062;
+      break;
+    case 1:
+      err = 5063;
+      break;
+    }
+    int node = (int)hugoOps.getTransaction()->getConnectedNodeId();
+    int node0 = res.getRandomNodeOtherNodeGroup(node, rand());
+    int node1 = res.getRandomNodeSameNodeGroup(node0, rand());
+
+    ndbout_c("node %u err: %u, node: %u err: %u",
+             node0, 5061, node1, err);
+
+    int val2[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 1 };
+
+    res.dumpStateOneNode(node, val2, 2);
+    res.insertErrorInNode(node0, 5061);
+    res.insertErrorInNode(node1, err);
+
+    hugoOps.execute_Commit(pNdb);
+    hugoOps.closeTransaction(pNdb);
+
+    res.waitNodesNoStart(&node, 1);
+    res.startNodes(&node, 1);
+    res.waitClusterStarted();
+    hugoOps.clearTable(pNdb);
+  }
+
+  return NDBT_OK;
+}
+
 NDBT_TESTSUITE(testNodeRestart);
 TESTCASE("NoLoad", 
 	 "Test that one node at a time can be stopped and then restarted "\
@@ -4609,6 +4662,10 @@ TESTCASE("Bug42422", ""){
 TESTCASE("Bug43224", ""){
   INITIALIZER(runBug43224);
 }
+TESTCASE("Bug58453", "")
+{
+  INITIALIZER(runBug58453);
+}
 TESTCASE("Bug43888", ""){
   INITIALIZER(runBug43888);
 }

=== modified file 'storage/ndb/test/run-test/daily-basic-tests.txt'
--- a/storage/ndb/test/run-test/daily-basic-tests.txt	2010-11-02 14:53:26 +0000
+++ b/storage/ndb/test/run-test/daily-basic-tests.txt	2010-11-24 12:16:55 +0000
@@ -1371,6 +1371,10 @@ cmd: testNodeRestart
 args: -n Bug36245 T1
 
 max-time: 300
+cmd: testNodeRestart
+args: -n Bug58453 T1
+
+max-time: 300
 cmd: test_event
 args: -n Bug34853 T1
 

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.1 branch (jonas:3989 to 3990) Jonas Oreland24 Nov