summaryrefslogtreecommitdiff
path: root/storage/ndb/test/ndbapi
diff options
context:
space:
mode:
authorunknown <jonas@perch.ndb.mysql.com>2008-01-11 09:31:55 +0100
committerunknown <jonas@perch.ndb.mysql.com>2008-01-11 09:31:55 +0100
commitb64f9dbe155e713c1f801b6ee4d114b09ce2b610 (patch)
tree4bf179442d9fb6dc675e2d062f175d17fc4cbaa0 /storage/ndb/test/ndbapi
parentd4045eedd818fd4b9ae93885091091e384fc5932 (diff)
parente984956385c6ee6370da97655bc217070558fbb1 (diff)
downloadmariadb-git-b64f9dbe155e713c1f801b6ee4d114b09ce2b610.tar.gz
Merge perch.ndb.mysql.com:/home/jonas/src/51-telco-gca
into perch.ndb.mysql.com:/home/jonas/src/51-ndb storage/ndb/src/kernel/blocks/ERROR_codes.txt: Auto merged storage/ndb/src/kernel/blocks/suma/Suma.cpp: Auto merged storage/ndb/test/run-test/daily-basic-tests.txt: merge
Diffstat (limited to 'storage/ndb/test/ndbapi')
-rw-r--r--storage/ndb/test/ndbapi/test_event.cpp61
1 files changed, 61 insertions, 0 deletions
diff --git a/storage/ndb/test/ndbapi/test_event.cpp b/storage/ndb/test/ndbapi/test_event.cpp
index 18825d734a4..a7504166065 100644
--- a/storage/ndb/test/ndbapi/test_event.cpp
+++ b/storage/ndb/test/ndbapi/test_event.cpp
@@ -1838,6 +1838,61 @@ runBug31701(NDBT_Context* ctx, NDBT_Step* step)
return NDBT_OK;
}
+int
+runBug33793(NDBT_Context* ctx, NDBT_Step* step)
+{
+ int result = NDBT_OK;
+ int loops = ctx->getNumLoops();
+
+ NdbRestarter restarter;
+
+ if (restarter.getNumDbNodes() < 2){
+ ctx->stopTest();
+ return NDBT_OK;
+ }
+ // This should really wait for applier to start...10s is likely enough
+ NdbSleep_SecSleep(10);
+
+ while (loops-- && ctx->isTestStopped() == false)
+ {
+ int nodeId = restarter.getDbNodeId(rand() % restarter.getNumDbNodes());
+ int nodecount = 0;
+ int nodes[255];
+ printf("nodeid: %u : victims: ", nodeId);
+ for (int i = 0; i<restarter.getNumDbNodes(); i++)
+ {
+ int id = restarter.getDbNodeId(i);
+ if (id == nodeId)
+ continue;
+
+ if (restarter.getNodeGroup(id) == restarter.getNodeGroup(nodeId))
+ {
+ nodes[nodecount++] = id;
+ printf("%u ", id);
+ int val2[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 1 };
+ if (restarter.dumpStateOneNode(id, val2, 2))
+ return NDBT_FAILED;
+ }
+ }
+ printf("\n"); fflush(stdout);
+
+ restarter.insertErrorInNode(nodeId, 13034);
+ if (restarter.waitNodesNoStart(nodes, nodecount))
+ return NDBT_FAILED;
+
+ if (restarter.startNodes(nodes, nodecount))
+ return NDBT_FAILED;
+
+ if (restarter.waitClusterStarted())
+ return NDBT_FAILED;
+ }
+
+ ctx->stopTest();
+ return NDBT_OK;
+}
+
+
+
NDBT_TESTSUITE(test_event);
TESTCASE("BasicEventOperation",
"Verify that we can listen to Events"
@@ -1975,6 +2030,12 @@ TESTCASE("Bug31701", ""){
FINALIZER(runDropEvent);
FINALIZER(runDropShadowTable);
}
+TESTCASE("Bug33793", ""){
+ INITIALIZER(runCreateEvent);
+ STEP(runEventListenerUntilStopped);
+ STEP(runBug33793);
+ FINALIZER(runDropEvent);
+}
NDBT_TESTSUITE_END(test_event);
int main(int argc, const char** argv){