#At file:///home/jonas/src/telco-6.3/ based on
revid:bocklin@stripped
2978 Jonas Oreland 2009-05-28
ndb - fix bug#25984 - that broke
M storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
M storage/ndb/test/ndbapi/testNodeRestart.cpp
=== modified file 'storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2009-05-27 12:11:46 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2009-05-28 06:03:13 +0000
@@ -9745,7 +9745,12 @@ Dbdih::resetReplicaSr(TabRecordPtr tabPt
* A COMPLETELY NEW REPLICA. WE WILL SET THE CREATE GCI TO BE THE
* NEXT GCI TO BE EXECUTED.
*--------_----------------------------------------------------- */
- const Uint32 nextCrashed = noCrashedReplicas + 1;
+ if (noCrashedReplicas + 1 == MAX_CRASHED_REPLICAS)
+ {
+ jam();
+ packCrashedReplicas(replicaPtr);
+ }
+ const Uint32 nextCrashed = replicaPtr.p->noCrashedReplicas + 1;
replicaPtr.p->noCrashedReplicas = nextCrashed;
arrGuardErr(nextCrashed, MAX_CRASHED_REPLICAS, NDBD_EXIT_MAX_CRASHED_REPLICAS);
replicaPtr.p->createGci[nextCrashed] = newestRestorableGCI + 1;
=== modified file 'storage/ndb/test/ndbapi/testNodeRestart.cpp'
--- a/storage/ndb/test/ndbapi/testNodeRestart.cpp 2009-05-27 12:11:46 +0000
+++ b/storage/ndb/test/ndbapi/testNodeRestart.cpp 2009-05-28 06:03:13 +0000
@@ -1324,10 +1324,16 @@ int runBug25554(NDBT_Context* ctx, NDBT_
int runBug25984(NDBT_Context* ctx, NDBT_Step* step)
{
NdbRestarter restarter;
+ Ndb* pNdb = GETNDB(step);
+
+ NdbDictionary::Table tab = * ctx->getTab();
+ NdbDictionary::Dictionary* pDict = GETNDB(step)->getDictionary();
if (restarter.getNumDbNodes() < 2)
return NDBT_OK;
+ pDict->dropTable(tab.getName());
+
if (restarter.restartAll(true, true, true))
return NDBT_FAILED;
@@ -1340,6 +1346,14 @@ int runBug25984(NDBT_Context* ctx, NDBT_
if (restarter.waitClusterStarted())
return NDBT_FAILED;
+ int res = pDict->createTable(tab);
+ if (res)
+ {
+ return NDBT_FAILED;
+ }
+ HugoTransactions trans(* pDict->getTable(tab.getName()));
+ trans.loadTable(pNdb, ctx->getNumRecords());
+
int val2[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 1 };
int master = restarter.getMasterNodeId();
int victim = restarter.getRandomNodeOtherNodeGroup(master, rand());
@@ -1359,6 +1373,8 @@ int runBug25984(NDBT_Context* ctx, NDBT_
if (restarter.insertErrorInNode(victim, 7191))
return NDBT_FAILED;
+
+ trans.scanUpdateRecords(pNdb, ctx->getNumRecords());
if (restarter.startNodes(&victim, 1))
return NDBT_FAILED;
@@ -1375,6 +1391,8 @@ int runBug25984(NDBT_Context* ctx, NDBT_
if (restarter.waitClusterStarted())
return NDBT_FAILED;
+ trans.scanUpdateRecords(pNdb, ctx->getNumRecords());
+
restarter.restartOneDbNode(victim, false, true, true);
for (Uint32 i = 0; i<1; i++)
{
@@ -1387,7 +1405,9 @@ int runBug25984(NDBT_Context* ctx, NDBT_
if (restarter.insertErrorInNode(victim, 7016))
return NDBT_FAILED;
-
+
+ trans.scanUpdateRecords(pNdb, ctx->getNumRecords());
+
if (restarter.startNodes(&victim, 1))
return NDBT_FAILED;
Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20090528060313-moq2kyeuk8qje9bs.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1-telco-6.3 branch (jonas:2978) Bug#25984 | Jonas Oreland | 28 May 2009 |