List:Commits« Previous MessageNext Message »
From:jonas Date:April 23 2007 3:44pm
Subject:bk commit into 5.1 tree (jonas:1.2603)
View as plain text  
Below is the list of changes that have just been committed into a local
5.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@stripped, 2007-04-23 15:43:56+02:00, jonas@stripped +2 -0
  Merge perch.ndb.mysql.com:/home/jonas/src/51-telco-gca
  into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
  MERGE: 1.2403.20.1

  storage/ndb/test/ndbapi/testNodeRestart.cpp@stripped, 2007-04-23 15:43:54+02:00,
jonas@stripped +3 -3
    merge
    MERGE: 1.38.1.10

  storage/ndb/test/run-test/daily-basic-tests.txt@stripped, 2007-04-23 15:43:54+02:00,
jonas@stripped +4 -4
    merge
    MERGE: 1.63.2.1

# 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-5.1-new-ndb/RESYNC

--- 1.79/storage/ndb/test/run-test/daily-basic-tests.txt	2007-04-23 15:44:02 +02:00
+++ 1.80/storage/ndb/test/run-test/daily-basic-tests.txt	2007-04-23 15:44:02 +02:00
@@ -549,6 +549,10 @@
 cmd: testNodeRestart
 args: -n Bug26481 T1
 
+max-time: 1000
+cmd: testNodeRestart
+args: -n Bug28023 T7 D2
+
 #
 # DICT TESTS
 max-time: 1500

--- 1.54/storage/ndb/test/ndbapi/testNodeRestart.cpp	2007-04-23 15:44:02 +02:00
+++ 1.55/storage/ndb/test/ndbapi/testNodeRestart.cpp	2007-04-23 15:44:02 +02:00
@@ -1567,6 +1567,72 @@
   return NDBT_OK;
 }
 
+int
+runBug28023(NDBT_Context* ctx, NDBT_Step* step)
+{
+  int result = NDBT_OK;
+  int loops = ctx->getNumLoops();
+  int records = ctx->getNumRecords();
+  Ndb* pNdb = GETNDB(step);
+  NdbRestarter res;
+
+  if (res.getNumDbNodes() < 2)
+  {
+    return NDBT_OK;
+  }
+
+
+  HugoTransactions hugoTrans(*ctx->getTab());
+  if (hugoTrans.loadTable(pNdb, records) != 0){
+    return NDBT_FAILED;
+  }
+  
+  if (hugoTrans.clearTable(pNdb, records) != 0)
+  {
+    return NDBT_FAILED;
+  }
+
+  for (Uint32 i = 0; i<loops; i++)
+  {
+    int node1 = res.getDbNodeId(rand() % res.getNumDbNodes());
+    
+    if (res.restartOneDbNode2(node1, 
+                              NdbRestarter::NRRF_ABORT |
+                              NdbRestarter::NRRF_NOSTART))
+      return NDBT_FAILED;
+    
+    if (res.waitNodesNoStart(&node1, 1))
+      return NDBT_FAILED;
+
+    if (hugoTrans.loadTable(pNdb, records) != 0){
+      return NDBT_FAILED;
+    }
+    
+    if (hugoTrans.clearTable(pNdb, records) != 0)
+    {
+      return NDBT_FAILED;
+    }
+    
+    res.startNodes(&node1, 1);
+    if (res.waitClusterStarted())
+      return NDBT_FAILED;
+
+    if (hugoTrans.loadTable(pNdb, records) != 0){
+      return NDBT_FAILED;
+    }
+    
+    if (hugoTrans.scanUpdateRecords(pNdb, records) != 0)
+      return NDBT_FAILED;
+
+    if (hugoTrans.clearTable(pNdb, records) != 0)
+    {
+      return NDBT_FAILED;
+    }
+  }
+  
+  return NDBT_OK;
+}
+
 NDBT_TESTSUITE(testNodeRestart);
 TESTCASE("NoLoad", 
 	 "Test that one node at a time can be stopped and then restarted "\
@@ -1923,6 +1989,9 @@
 }
 TESTCASE("Bug27466", ""){
   INITIALIZER(runBug27466);
+}
+TESTCASE("Bug28023", ""){
+  INITIALIZER(runBug28023);
 }
 NDBT_TESTSUITE_END(testNodeRestart);
 
Thread
bk commit into 5.1 tree (jonas:1.2603)jonas23 Apr