List:Commits« Previous MessageNext Message »
From:jonas Date:March 15 2007 12:37pm
Subject:bk commit into 5.1 tree (jonas:1.2490)
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-03-15 13:37:11+01:00, jonas@stripped +3 -0
  Merge perch.ndb.mysql.com:/home/jonas/src/51-telco-gca
  into  perch.ndb.mysql.com:/home/jonas/src/51-telco
  MERGE: 1.2403.27.8

  storage/ndb/src/kernel/blocks/suma/Suma.cpp@stripped, 2007-03-15 13:37:07+01:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.50.3.3

  storage/ndb/test/ndbapi/test_event.cpp@stripped, 2007-03-15 13:37:07+01:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.23.1.2

  storage/ndb/test/run-test/daily-basic-tests.txt@stripped, 2007-03-15 13:37:07+01:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.61.2.4

# 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/51-telco/RESYNC

--- 1.78/storage/ndb/test/run-test/daily-basic-tests.txt	2007-03-15 13:37:16 +01:00
+++ 1.79/storage/ndb/test/run-test/daily-basic-tests.txt	2007-03-15 13:37:16 +01:00
@@ -796,6 +796,10 @@
 cmd: testNodeRestart
 args: -n Bug25468 T1
 
+max-time: 1000
+cmd: test_event
+args: -l 10 -n Bug27169 T1
+
 # OLD FLEX
 max-time: 500
 cmd: flexBench

--- 1.59/storage/ndb/src/kernel/blocks/suma/Suma.cpp	2007-03-15 13:37:16 +01:00
+++ 1.60/storage/ndb/src/kernel/blocks/suma/Suma.cpp	2007-03-15 13:37:16 +01:00
@@ -5001,8 +5001,11 @@
     {
       continue;
     }
+
+    ndbrequire(sz);
+    sz --; // remove *len* part of sz
     
-    if(sz == 1)
+    if(sz == 0)
     {
       SubGcpCompleteRep * rep = (SubGcpCompleteRep*)signal->getDataPtrSend();
       rep->gci = last_gci;

--- 1.25/storage/ndb/test/ndbapi/test_event.cpp	2007-03-15 13:37:16 +01:00
+++ 1.26/storage/ndb/test/ndbapi/test_event.cpp	2007-03-15 13:37:16 +01:00
@@ -836,6 +836,67 @@
   DBUG_RETURN(result);
 }
 
+int runEventListenerUntilStopped(NDBT_Context* ctx, NDBT_Step* step)
+{
+  
+  int result = NDBT_OK;
+  const NdbDictionary::Table * table= ctx->getTab();
+  HugoTransactions hugoTrans(* table);
+
+  char buf[1024];
+  sprintf(buf, "%s_EVENT", table->getName());
+  NdbEventOperation *pOp, *pCreate = 0;
+  pCreate = pOp = GETNDB(step)->createEventOperation(buf);
+  if ( pOp == NULL ) {
+    g_err << "Event operation creation failed on %s" << buf << endl;
+    return NDBT_FAILED;
+  }
+  
+  int i;
+  int n_columns= table->getNoOfColumns();
+  NdbRecAttr* recAttr[1024];
+  NdbRecAttr* recAttrPre[1024];
+  for (i = 0; i < n_columns; i++) {
+    recAttr[i]    = pOp->getValue(table->getColumn(i)->getName());
+    recAttrPre[i] = pOp->getPreValue(table->getColumn(i)->getName());
+  }
+
+  if (pOp->execute()) 
+  { // This starts changes to "start flowing"
+    g_err << "execute operation execution failed: \n";
+    g_err << pOp->getNdbError().code << " "
+	  << pOp->getNdbError().message << endl;
+    result = NDBT_FAILED;
+    goto end;
+  }
+  
+  Ndb* ndb= GETNDB(step);
+  while(!ctx->isTestStopped())
+  {
+    Uint64 curr_gci = 0;
+    while(!ctx->isTestStopped())
+    {
+      ndb->pollEvents(100, &curr_gci);
+      while ((pOp= ndb->nextEvent()) != 0)
+      {
+	assert(pOp == pCreate);
+      } 
+    }
+  }
+  
+end:
+  if(pCreate)
+  {
+    if (GETNDB(step)->dropEventOperation(pCreate)) {
+      g_err << "dropEventOperation execution failed "
+	    << GETNDB(step)->getNdbError().code << " "
+	    << GETNDB(step)->getNdbError().message << endl;
+      result = NDBT_FAILED;
+    }
+  }
+  return result;
+}
+
 int runRestarter(NDBT_Context* ctx, NDBT_Step* step){
   int result = NDBT_OK;
   int loops = ctx->getNumLoops();
@@ -877,6 +938,51 @@
   return result;
 }
 
+int runRestarterLoop(NDBT_Context* ctx, NDBT_Step* step)
+{
+  int result = NDBT_OK;
+  int loops = ctx->getNumLoops();
+  NdbRestarter restarter;
+  int i = 0;
+  int lastId = 0;
+
+  if (restarter.getNumDbNodes() < 2){
+    ctx->stopTest();
+    return NDBT_OK;
+  }
+
+  if(restarter.waitClusterStarted(60) != 0){
+    g_err << "Cluster failed to start" << endl;
+    return NDBT_FAILED;
+  }
+  
+  while(result != NDBT_FAILED 
+	&& !ctx->isTestStopped() 
+	&& i < loops)
+  {
+    int id = lastId % restarter.getNumDbNodes();
+    int nodeId = restarter.getDbNodeId(id);
+    ndbout << "Restart node " << nodeId << endl; 
+    if(restarter.restartOneDbNode(nodeId, false, false, true) != 0){
+      g_err << "Failed to restartNextDbNode" << endl;
+      result = NDBT_FAILED;
+      break;
+    }    
+    
+    if(restarter.waitClusterStarted(60) != 0){
+      g_err << "Cluster failed to start" << endl;
+      result = NDBT_FAILED;
+      break;
+    }
+    
+    lastId++;
+    i++;
+  }
+
+  ctx->stopTest();
+  return result;
+}
+
 Vector<const NdbDictionary::Table*> pTabs;
 Vector<const NdbDictionary::Table*> pShadowTabs;
 
@@ -1616,6 +1722,42 @@
   return NDBT_OK;
 }
 
+int 
+runScanUpdateUntilStopped(NDBT_Context* ctx, NDBT_Step* step){
+  int records = ctx->getNumRecords();
+  int parallelism = ctx->getProperty("Parallelism", (Uint32)0);
+  int abort = ctx->getProperty("AbortProb", (Uint32)0);
+  HugoTransactions hugoTrans(*ctx->getTab());
+  while (ctx->isTestStopped() == false) 
+  {
+    if (hugoTrans.scanUpdateRecords(GETNDB(step), records, abort, 
+				    parallelism) == NDBT_FAILED){
+      return NDBT_FAILED;
+    }
+  }
+  return NDBT_OK;
+}
+
+int 
+runInsertDeleteUntilStopped(NDBT_Context* ctx, NDBT_Step* step)
+{
+  int result = NDBT_OK;
+  int records = ctx->getNumRecords();
+  HugoTransactions hugoTrans(*ctx->getTab());
+  UtilTransactions utilTrans(*ctx->getTab());
+  while (ctx->isTestStopped() == false) 
+  {
+    if (hugoTrans.loadTable(GETNDB(step), records, 1) != 0){
+      return NDBT_FAILED;
+    }
+    if (utilTrans.clearTable(GETNDB(step),  records) != 0){
+      return NDBT_FAILED;
+    }
+  }
+  
+  return NDBT_OK;
+}
+
 NDBT_TESTSUITE(test_event);
 TESTCASE("BasicEventOperation", 
 	 "Verify that we can listen to Events"
@@ -1735,6 +1877,14 @@
 	 "NOTE! No errors are allowed!" ){
   INITIALIZER(runCreateEvent);
   STEPS(runSubscribeUnsubscribe, 16);
+  FINALIZER(runDropEvent);
+}
+TESTCASE("Bug27169", ""){
+  INITIALIZER(runCreateEvent);
+  STEP(runEventListenerUntilStopped);
+  STEP(runInsertDeleteUntilStopped);
+  STEP(runScanUpdateUntilStopped);
+  STEP(runRestarterLoop);
   FINALIZER(runDropEvent);
 }
 NDBT_TESTSUITE_END(test_event);
Thread
bk commit into 5.1 tree (jonas:1.2490)jonas15 Mar