summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--storage/ndb/test/ndbapi/testNodeRestart.cpp69
-rw-r--r--storage/ndb/test/run-test/daily-basic-tests.txt4
2 files changed, 73 insertions, 0 deletions
diff --git a/storage/ndb/test/ndbapi/testNodeRestart.cpp b/storage/ndb/test/ndbapi/testNodeRestart.cpp
index e5e346f3e42..85dbc2aab2a 100644
--- a/storage/ndb/test/ndbapi/testNodeRestart.cpp
+++ b/storage/ndb/test/ndbapi/testNodeRestart.cpp
@@ -1567,6 +1567,72 @@ runBug27466(NDBT_Context* ctx, NDBT_Step* step)
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 "\
@@ -1924,6 +1990,9 @@ TESTCASE("Bug27283", ""){
TESTCASE("Bug27466", ""){
INITIALIZER(runBug27466);
}
+TESTCASE("Bug28023", ""){
+ INITIALIZER(runBug28023);
+}
NDBT_TESTSUITE_END(testNodeRestart);
int main(int argc, const char** argv){
diff --git a/storage/ndb/test/run-test/daily-basic-tests.txt b/storage/ndb/test/run-test/daily-basic-tests.txt
index df4f6c1ab38..181efc0ddc5 100644
--- a/storage/ndb/test/run-test/daily-basic-tests.txt
+++ b/storage/ndb/test/run-test/daily-basic-tests.txt
@@ -549,6 +549,10 @@ max-time: 1000
cmd: testNodeRestart
args: -n Bug26481 T1
+max-time: 1000
+cmd: testNodeRestart
+args: -n Bug28023 T7 D2
+
#
# DICT TESTS
max-time: 1500