List:Internals« Previous MessageNext Message »
From:jonas Date:December 12 2005 4:19pm
Subject:bk commit into 4.1 tree (jonas:1.2459) BUG#15685
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of jonas. When jonas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2459 05/12/12 17:19:04 jonas@stripped +5 -0
  ndb - bug#15685
    Error in abort handling in TC when timeout during abort
    

  ndb/test/run-test/daily-basic-tests.txt
    1.24 05/12/12 17:19:02 jonas@stripped +8 -0
    Test case

  ndb/test/ndbapi/testNodeRestart.cpp
    1.13 05/12/12 17:19:02 jonas@stripped +44 -0
    Test case

  ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
    1.61 05/12/12 17:19:02 jonas@stripped +1 -2
    Dont release transaction record to early

  ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
    1.58 05/12/12 17:19:02 jonas@stripped +10 -1
    New error codes

  ndb/src/kernel/blocks/ERROR_codes.txt
    1.12 05/12/12 17:19:02 jonas@stripped +4 -0
    New error codes

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	jonas
# Host:	perch.ndb.mysql.com
# Root:	/home/jonas/src/mysql-4.1

--- 1.23/ndb/test/run-test/daily-basic-tests.txt	2005-12-08 15:29:37 +01:00
+++ 1.24/ndb/test/run-test/daily-basic-tests.txt	2005-12-12 17:19:02 +01:00
@@ -438,6 +438,14 @@
 cmd: testNodeRestart
 args: -n Bug15587 T1
 
+max-time: 500
+cmd: testNodeRestart
+args: -n Bug15632 T1
+
+max-time: 500
+cmd: testNodeRestart
+args: -n Bug15685 T1
+
 # OLD FLEX
 max-time: 500
 cmd: flexBench

--- 1.11/ndb/src/kernel/blocks/ERROR_codes.txt	2005-12-09 13:51:10 +01:00
+++ 1.12/ndb/src/kernel/blocks/ERROR_codes.txt	2005-12-12 17:19:02 +01:00
@@ -165,6 +165,7 @@
 time-out handling. They can also be used to test multiple node failure
 handling.
 
+
 ERROR CODES FOR TESTING TIME-OUT HANDLING IN DBLQH
 -------------------------------------------------
 5011:
@@ -200,6 +201,9 @@
 
 8048: Make TC not choose own node for simple/dirty read
 5041: Crash is receiving simple read from other TC on different node
+
+5100,5101: Drop ABORT req in primary replica
+           Crash on "next" ABORT
 
 ERROR CODES FOR TESTING TIME-OUT HANDLING IN DBTC
 -------------------------------------------------

--- 1.57/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2005-12-08 15:28:13 +01:00
+++ 1.58/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2005-12-12 17:19:02 +01:00
@@ -5870,12 +5870,21 @@
     warningReport(signal, 8);
     return;
   }//if
+  
+  TcConnectionrec * const regTcPtr = tcConnectptr.p;
+
+  if (ERROR_INSERTED(5100))
+  {
+    SET_ERROR_INSERT_VALUE(5101);
+    return;
+  }
+  CRASH_INSERTION2(5101, regTcPtr->nextReplica != ZNIL);
+  
 /* ------------------------------------------------------------------------- */
 /*A GUIDING DESIGN PRINCIPLE IN HANDLING THESE ERROR SITUATIONS HAVE BEEN    */
 /*KEEP IT SIMPLE. THUS WE RATHER INSERT A WAIT AND SET THE ABORT_STATE TO    */
 /*ACTIVE RATHER THAN WRITE NEW CODE TO HANDLE EVERY SPECIAL SITUATION.       */
 /* ------------------------------------------------------------------------- */
-  TcConnectionrec * const regTcPtr = tcConnectptr.p;
   if (regTcPtr->nextReplica != ZNIL) {
 /* ------------------------------------------------------------------------- */
 // We will immediately send the ABORT message also to the next LQH node in line.

--- 1.60/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2005-10-21 06:41:46 +02:00
+++ 1.61/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2005-12-12 17:19:02 +01:00
@@ -6129,7 +6129,6 @@
 	<< " - place: " << c_apiConTimer_line[apiConnectptr.i]);
   switch (apiConnectptr.p->apiConnectstate) {
   case CS_STARTED:
-    ndbrequire(c_apiConTimer_line[apiConnectptr.i] != 3615);
     if(apiConnectptr.p->lqhkeyreqrec == apiConnectptr.p->lqhkeyconfrec){
       jam();
       /*
@@ -6389,8 +6388,8 @@
 	warningEvent(buf);
 	ndbout_c(buf);
 	ndbrequire(false);
+	releaseAbortResources(signal);
       }
-      releaseAbortResources(signal);
       return;
     }//if
     TloopCount++;

--- 1.12/ndb/test/ndbapi/testNodeRestart.cpp	2005-12-09 13:51:10 +01:00
+++ 1.13/ndb/test/ndbapi/testNodeRestart.cpp	2005-12-12 17:19:02 +01:00
@@ -496,6 +496,45 @@
   return NDBT_OK;
 }
 
+int runBug15685(NDBT_Context* ctx, NDBT_Step* step){
+
+  Ndb* pNdb = GETNDB(step);
+  HugoOperations hugoOps(*ctx->getTab());
+  NdbRestarter restarter;
+
+  HugoTransactions hugoTrans(*ctx->getTab());
+  if (hugoTrans.loadTable(GETNDB(step), 10) != 0){
+    return NDBT_FAILED;
+  }
+
+  if(hugoOps.startTransaction(pNdb) != 0)
+    goto err;
+  
+  if(hugoOps.pkUpdateRecord(pNdb, 0, 1, rand()) != 0)
+    goto err;
+
+  if(hugoOps.execute_NoCommit(pNdb) != 0)
+    goto err;
+
+  if (restarter.insertErrorInAllNodes(5100))
+    return NDBT_FAILED;
+  
+  hugoOps.execute_Rollback(pNdb);
+
+  if (restarter.waitClusterStarted() != 0)
+    goto err;
+
+  if (restarter.insertErrorInAllNodes(0))
+    return NDBT_FAILED;
+  
+  ctx->stopTest();
+  return NDBT_OK;
+  
+err:
+  ctx->stopTest();
+  return NDBT_FAILED;
+}
+
 
 NDBT_TESTSUITE(testNodeRestart);
 TESTCASE("NoLoad", 
@@ -774,6 +813,11 @@
 	 "Test bug with NF during NR"){
   INITIALIZER(runLoadTable);
   STEP(runBug15632);
+  FINALIZER(runClearTable);
+}
+TESTCASE("Bug15685",
+	 "Test bug with NF during abort"){
+  STEP(runBug15685);
   FINALIZER(runClearTable);
 }
 NDBT_TESTSUITE_END(testNodeRestart);
Thread
bk commit into 4.1 tree (jonas:1.2459) BUG#15685jonas12 Dec