summaryrefslogtreecommitdiff
path: root/ndb
diff options
context:
space:
mode:
authorunknown <jonas@perch.ndb.mysql.com>2006-04-03 20:43:14 +0200
committerunknown <jonas@perch.ndb.mysql.com>2006-04-03 20:43:14 +0200
commit1dc85e36a5e7c3d80fdc83e710c4a0be610e786c (patch)
treea91b6a1e0a8a4c71edb7a412279af1b35877ff1d /ndb
parent525660d31446d10a4be2341773e0e5baa7e98bbe (diff)
downloadmariadb-git-1dc85e36a5e7c3d80fdc83e710c4a0be610e786c.tar.gz
ndb -
fix testprogam if only 1 node group ndb/test/ndbapi/testNodeRestart.cpp: fix testprogam if only 1 node group
Diffstat (limited to 'ndb')
-rw-r--r--ndb/test/ndbapi/testNodeRestart.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/ndb/test/ndbapi/testNodeRestart.cpp b/ndb/test/ndbapi/testNodeRestart.cpp
index d297527ac8b..7017aac0ade 100644
--- a/ndb/test/ndbapi/testNodeRestart.cpp
+++ b/ndb/test/ndbapi/testNodeRestart.cpp
@@ -694,7 +694,10 @@ runBug18612(NDBT_Context* ctx, NDBT_Step* step){
for (Uint32 i = 0; i<cnt/2; i++)
{
do {
- node1 = restarter.getRandomNodeOtherNodeGroup(node1, rand());
+ int tmp = restarter.getRandomNodeOtherNodeGroup(node1, rand());
+ if (tmp == -1)
+ break;
+ node1 = tmp;
} while(nodesmask.get(node1));
partition0[i] = node1;
@@ -797,7 +800,10 @@ runBug18612SR(NDBT_Context* ctx, NDBT_Step* step){
for (Uint32 i = 0; i<cnt/2; i++)
{
do {
- node1 = restarter.getRandomNodeOtherNodeGroup(node1, rand());
+ int tmp = restarter.getRandomNodeOtherNodeGroup(node1, rand());
+ if (tmp == -1)
+ break;
+ node1 = tmp;
} while(nodesmask.get(node1));
partition0[i] = node1;