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, 2008-03-25 14:23:06+01:00, jonas@stripped +3 -0
ndb - mix autotest fixes
storage/ndb/test/ndbapi/testSystemRestart.cpp@stripped, 2008-03-25 14:23:03+01:00,
jonas@stripped +77 -0
add new testcase which does basic SR on all tables
storage/ndb/test/ndbapi/test_event.cpp@stripped, 2008-03-25 14:23:03+01:00,
jonas@stripped +1 -1
fix test_event wrt dropEvent
storage/ndb/test/run-test/daily-basic-tests.txt@stripped, 2008-03-25 14:23:03+01:00,
jonas@stripped +4 -0
add new testcase which does basic SR on all tables
diff -Nrup a/storage/ndb/test/ndbapi/testSystemRestart.cpp
b/storage/ndb/test/ndbapi/testSystemRestart.cpp
--- a/storage/ndb/test/ndbapi/testSystemRestart.cpp 2007-11-19 10:47:23 +01:00
+++ b/storage/ndb/test/ndbapi/testSystemRestart.cpp 2008-03-25 14:23:03 +01:00
@@ -1581,6 +1581,76 @@ runBug27434(NDBT_Context* ctx, NDBT_Step
return result;
}
+
+int
+runCreateAllTables(NDBT_Context* ctx, NDBT_Step* step)
+{
+ if (NDBT_Tables::createAllTables(GETNDB(step), false, true))
+ return NDBT_FAILED;
+ return NDBT_OK;
+}
+
+int
+runBasic(NDBT_Context* ctx, NDBT_Step* step)
+{
+ Ndb* pNdb = GETNDB(step);
+ NdbDictionary::Dictionary * pDict = pNdb->getDictionary();
+ int loops = ctx->getNumLoops();
+ int records = ctx->getNumRecords();
+ NdbRestarter restarter;
+ int result = NDBT_OK;
+
+ for (int l = 0; l<loops; l++)
+ {
+ for (int i = 0; i<NDBT_Tables::getNumTables(); i++)
+ {
+ const NdbDictionary::Table* tab =
+ pDict->getTable(NDBT_Tables::getTable(i)->getName());
+ HugoTransactions trans(* tab);
+ switch(l % 3){
+ case 0:
+ trans.loadTable(pNdb, records);
+ trans.scanUpdateRecords(pNdb, records);
+ break;
+ case 1:
+ trans.scanUpdateRecords(pNdb, records);
+ trans.clearTable(pNdb, records/2);
+ trans.loadTable(pNdb, records/2);
+ break;
+ case 2:
+ trans.clearTable(pNdb, records/2);
+ trans.loadTable(pNdb, records/2);
+ trans.clearTable(pNdb, records/2);
+ break;
+ }
+ }
+
+ ndbout << "Restarting cluster..." << endl;
+ CHECK(restarter.restartAll(false, true, false) == 0);
+ CHECK(restarter.waitClusterNoStart() == 0);
+ CHECK(restarter.startAll() == 0);
+ CHECK(restarter.waitClusterStarted() == 0);
+ CHECK(pNdb->waitUntilReady() == 0);
+
+ for (int i = 0; i<NDBT_Tables::getNumTables(); i++)
+ {
+ const NdbDictionary::Table* tab =
+ pDict->getTable(NDBT_Tables::getTable(i)->getName());
+ HugoTransactions trans(* tab);
+ trans.scanUpdateRecords(pNdb, records);
+ }
+ }
+
+ return result;
+}
+
+int
+runDropAllTables(NDBT_Context* ctx, NDBT_Step* step)
+{
+ NDBT_Tables::dropAllTables(GETNDB(step));
+ return NDBT_OK;
+}
+
NDBT_TESTSUITE(testSystemRestart);
TESTCASE("SR1",
"Basic system restart test. Focus on testing restart from REDO log.\n"
@@ -1851,6 +1921,13 @@ TESTCASE("Bug22696", "")
INITIALIZER(runLoadTable);
INITIALIZER(runBug22696);
FINALIZER(runClearTable);
+}
+TESTCASE("basic", "")
+{
+ INITIALIZER(runWaitStarted);
+ INITIALIZER(runCreateAllTables);
+ STEP(runBasic);
+ FINALIZER(runDropAllTables);
}
NDBT_TESTSUITE_END(testSystemRestart);
diff -Nrup a/storage/ndb/test/ndbapi/test_event.cpp
b/storage/ndb/test/ndbapi/test_event.cpp
--- a/storage/ndb/test/ndbapi/test_event.cpp 2008-01-11 09:20:14 +01:00
+++ b/storage/ndb/test/ndbapi/test_event.cpp 2008-03-25 14:23:03 +01:00
@@ -550,7 +550,7 @@ int runEventMixedLoad(NDBT_Context* ctx,
int runDropEvent(NDBT_Context* ctx, NDBT_Step* step)
{
- return NDBT_OK;
+ return dropEvent(GETNDB(step), * ctx->getTab());
}
int runVerify(NDBT_Context* ctx, NDBT_Step* step)
diff -Nrup a/storage/ndb/test/run-test/daily-basic-tests.txt
b/storage/ndb/test/run-test/daily-basic-tests.txt
--- a/storage/ndb/test/run-test/daily-basic-tests.txt 2008-03-20 14:00:34 +01:00
+++ b/storage/ndb/test/run-test/daily-basic-tests.txt 2008-03-25 14:23:03 +01:00
@@ -794,6 +794,10 @@ args:
#
max-time: 1500
cmd: testSystemRestart
+args: -n basic T1
+
+max-time: 1500
+cmd: testSystemRestart
args: -n SR1 T1
max-time: 1500
| Thread |
|---|
| • bk commit into 5.1 tree (jonas:1.2549) | jonas | 25 Mar 2008 |