Below is the list of changes that have just been committed into a local
5.0 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, 2007-03-20 16:26:51+01:00, jonas@stripped +9 -0
Merge perch.ndb.mysql.com:/home/jonas/src/50-work
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-ndb
MERGE: 1.2216.70.54
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp@stripped, 2007-03-20 16:26:48+01:00, jonas@stripped +0 -0
Auto merged
MERGE: 1.55.1.14
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp@stripped, 2007-03-20 16:26:48+01:00, jonas@stripped +0 -0
Auto merged
MERGE: 1.97.2.4
ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp@stripped, 2007-03-20 16:26:49+01:00, jonas@stripped +0 -0
Auto merged
MERGE: 1.22.1.1
ndb/src/kernel/blocks/dbtup/DbtupGen.cpp@stripped, 2007-03-20 16:26:49+01:00, jonas@stripped +0 -0
Auto merged
MERGE: 1.20.1.1
ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp@stripped, 2007-03-20 16:26:49+01:00, jonas@stripped +0 -0
Auto merged
MERGE: 1.32.1.2
ndb/src/mgmsrv/ConfigInfo.cpp@stripped, 2007-03-20 16:26:49+01:00, jonas@stripped +0 -0
Auto merged
MERGE: 1.77.1.3
ndb/test/ndbapi/testNodeRestart.cpp@stripped, 2007-03-20 16:26:49+01:00, jonas@stripped +0 -0
Auto merged
MERGE: 1.24.1.6
ndb/test/run-test/daily-basic-tests.txt@stripped, 2007-03-20 16:26:49+01:00, jonas@stripped +0 -0
Auto merged
MERGE: 1.41.1.10
ndb/test/src/UtilTransactions.cpp@stripped, 2007-03-20 16:26:49+01:00, jonas@stripped +0 -0
Auto merged
MERGE: 1.19.1.1
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: jonas
# Host: perch.ndb.mysql.com
# Root: /home/jonas/src/mysql-5.0-ndb/RESYNC
--- 1.48/ndb/test/run-test/daily-basic-tests.txt 2007-03-20 16:26:56 +01:00
+++ 1.49/ndb/test/run-test/daily-basic-tests.txt 2007-03-20 16:26:56 +01:00
@@ -425,6 +425,14 @@
cmd: testScan
args: -n Bug24447 T1
+max-time: 1000
+cmd: testNodeRestart
+args: -n Bug27003 T1
+
+max-time: 1000
+cmd: testNodeRestart
+args: -n Bug27283 T1
+
max-time: 500
cmd: testNodeRestart
args: -n Bug15587 T1
--- 1.85/ndb/src/mgmsrv/ConfigInfo.cpp 2007-03-20 16:26:56 +01:00
+++ 1.86/ndb/src/mgmsrv/ConfigInfo.cpp 2007-03-20 16:26:56 +01:00
@@ -565,7 +565,7 @@
true,
ConfigInfo::CI_INT,
"0",
- "1",
+ "0",
"2" },
{
--- 1.70/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2007-03-20 16:26:56 +01:00
+++ 1.71/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2007-03-20 16:26:56 +01:00
@@ -4811,6 +4811,15 @@
} else {
ndbrequire(failedNodePtr.p->nodeStatus == NodeRecord::DYING);
}//if
+
+ if (ERROR_INSERTED(7181))
+ {
+ ndbout_c("execGCP_TCFINISHED in MASTER_GCPREQ");
+ CLEAR_ERROR_INSERT_VALUE;
+ signal->theData[1] = coldgcp;
+ execGCP_TCFINISHED(signal);
+ }
+
MasterGCPConf::State gcpState;
switch (cgcpParticipantState) {
case GCP_PARTICIPANT_READY:
@@ -4877,6 +4886,14 @@
masterGCPConf->lcpActive[i] = SYSFILE->lcpActive[i];
sendSignal(newMasterBlockref, GSN_MASTER_GCPCONF, signal,
MasterGCPConf::SignalLength, JBB);
+
+ if (ERROR_INSERTED(7182))
+ {
+ ndbout_c("execGCP_TCFINISHED in MASTER_GCPREQ");
+ CLEAR_ERROR_INSERT_VALUE;
+ signal->theData[1] = coldgcp;
+ execGCP_TCFINISHED(signal);
+ }
}//Dbdih::execMASTER_GCPREQ()
void Dbdih::execMASTER_GCPCONF(Signal* signal)
@@ -7549,10 +7566,10 @@
} else if (cmasterState == MASTER_TAKE_OVER_GCP) {
jam();
//-------------------------------------------------------------
- // We are currently taking over as master. We will delay the
- // signal until we have completed the take over gcp handling.
+ // We are currently taking over as master. Ignore
+ // signal in this case since we will discover it in reception of
+ // MASTER_GCPCONF.
//-------------------------------------------------------------
- sendSignalWithDelay(reference(), GSN_GCP_NODEFINISH, signal, 20, 3);
return;
} else {
ndbrequire(cmasterState == MASTER_ACTIVE);
@@ -7698,6 +7715,15 @@
CRASH_INSERTION(7007);
Uint32 gci = signal->theData[1];
ndbrequire(gci == coldgcp);
+
+ if (ERROR_INSERTED(7181) || ERROR_INSERTED(7182))
+ {
+ ndbout_c("killing %d", refToNode(cmasterdihref));
+ signal->theData[0] = 9999;
+ sendSignal(numberToRef(CMVMI, refToNode(cmasterdihref)),
+ GSN_NDB_TAMPER, signal, 1, JBB);
+ return;
+ }
cgcpParticipantState = GCP_PARTICIPANT_TC_FINISHED;
signal->theData[0] = cownNodeId;
--- 1.103/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2007-03-20 16:26:56 +01:00
+++ 1.104/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2007-03-20 16:26:56 +01:00
@@ -9634,6 +9634,15 @@
closeCopyLab(signal);
return;
}//if
+
+ if (scanptr.p->scanState == ScanRecord::WAIT_LQHKEY_COPY &&
+ scanptr.p->scanErrorCounter)
+ {
+ jam();
+ closeCopyLab(signal);
+ return;
+ }
+
if (scanptr.p->scanState == ScanRecord::WAIT_LQHKEY_COPY) {
jam();
/*---------------------------------------------------------------------------*/
@@ -9710,13 +9719,16 @@
void Dblqh::copyLqhKeyRefLab(Signal* signal)
{
ndbrequire(tcConnectptr.p->transid[1] == signal->theData[4]);
- tcConnectptr.p->copyCountWords -= signal->theData[3];
+ Uint32 copyWords = signal->theData[3];
scanptr.i = tcConnectptr.p->tcScanRec;
c_scanRecordPool.getPtr(scanptr);
scanptr.p->scanErrorCounter++;
tcConnectptr.p->errorCode = terrorCode;
- closeCopyLab(signal);
- return;
+
+ LqhKeyConf* conf = (LqhKeyConf*)signal->getDataPtrSend();
+ conf->transId1 = copyWords;
+ conf->transId2 = tcConnectptr.p->transid[1];
+ copyCompletedLab(signal);
}//Dblqh::copyLqhKeyRefLab()
void Dblqh::closeCopyLab(Signal* signal)
@@ -9727,6 +9739,7 @@
// Wait until all of those have arrived until we start the
// close process.
/*---------------------------------------------------------------------------*/
+ scanptr.p->scanState = ScanRecord::WAIT_LQHKEY_COPY;
jam();
return;
}//if
--- 1.23/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp 2007-03-20 16:26:56 +01:00
+++ 1.24/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp 2007-03-20 16:26:56 +01:00
@@ -212,6 +212,30 @@
//---------------------------------------------------
PagePtr pagePtr;
Uint32 pageOffset;
+
+ if (ERROR_INSERTED(4025))
+ {
+ signal->theData[0] = 827;
+ return;
+ }
+ if (ERROR_INSERTED(4026))
+ {
+ CLEAR_ERROR_INSERT_VALUE;
+ signal->theData[0] = 827;
+ return;
+ }
+ if (ERROR_INSERTED(4027) && (rand() % 100) > 25)
+ {
+ signal->theData[0] = 827;
+ return;
+ }
+ if (ERROR_INSERTED(4028) && (rand() % 100) > 25)
+ {
+ CLEAR_ERROR_INSERT_VALUE;
+ signal->theData[0] = 827;
+ return;
+ }
+
if (!allocTh(regFragPtr.p,
regTabPtr.p,
NORMAL_PAGE,
--- 1.22/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp 2007-03-20 16:26:56 +01:00
+++ 1.23/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp 2007-03-20 16:26:56 +01:00
@@ -65,6 +65,7 @@
undoPage = 0;
totNoOfPagesAllocated = 0;
cnoOfAllocatedPages = 0;
+ CLEAR_ERROR_INSERT_VALUE;
// Records with constant sizes
}//Dbtup::initData()
@@ -568,7 +569,6 @@
switch (startPhase) {
case ZSTARTPHASE1:
ljam();
- CLEAR_ERROR_INSERT_VALUE;
cownref = calcTupBlockRef(0);
break;
default:
--- 1.39/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp 2007-03-20 16:26:56 +01:00
+++ 1.40/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp 2007-03-20 16:26:56 +01:00
@@ -179,6 +179,7 @@
break;
case SystemError::CopyFragRefError:
+ CRASH_INSERTION(1000);
BaseString::snprintf(buf, sizeof(buf),
"Killed by node %d as "
"copyfrag failed, error: %u",
--- 1.28/ndb/test/ndbapi/testNodeRestart.cpp 2007-03-20 16:26:56 +01:00
+++ 1.29/ndb/test/ndbapi/testNodeRestart.cpp 2007-03-20 16:26:56 +01:00
@@ -1124,6 +1124,101 @@
return NDBT_OK;
}
+int
+runBug27003(NDBT_Context* ctx, NDBT_Step* step)
+{
+ int result = NDBT_OK;
+ int loops = ctx->getNumLoops();
+ int records = ctx->getNumRecords();
+ NdbRestarter res;
+
+ static const int errnos[] = { 4025, 4026, 4027, 4028, 0 };
+
+ int node = res.getRandomNotMasterNodeId(rand());
+ ndbout_c("node: %d", node);
+ if (res.restartOneDbNode(node, false, true, true))
+ return NDBT_FAILED;
+
+ Uint32 pos = 0;
+ for (Uint32 i = 0; i<loops; i++)
+ {
+ while (errnos[pos] != 0)
+ {
+ ndbout_c("Tesing err: %d", errnos[pos]);
+
+ if (res.waitNodesNoStart(&node, 1))
+ return NDBT_FAILED;
+
+ if (res.insertErrorInNode(node, 1000))
+ return NDBT_FAILED;
+
+ if (res.insertErrorInNode(node, errnos[pos]))
+ return NDBT_FAILED;
+
+ int val2[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 1 };
+ if (res.dumpStateOneNode(node, val2, 2))
+ return NDBT_FAILED;
+
+ res.startNodes(&node, 1);
+ res.waitNodesStartPhase(&node, 1, 2);
+ pos++;
+ }
+ pos = 0;
+ }
+
+ if (res.waitNodesNoStart(&node, 1))
+ return NDBT_FAILED;
+
+ res.startNodes(&node, 1);
+ if (res.waitClusterStarted())
+ return NDBT_FAILED;
+
+ return NDBT_OK;
+}
+
+
+int
+runBug27283(NDBT_Context* ctx, NDBT_Step* step)
+{
+ int result = NDBT_OK;
+ int loops = ctx->getNumLoops();
+ int records = ctx->getNumRecords();
+ NdbRestarter res;
+
+ if (res.getNumDbNodes() < 2)
+ {
+ return NDBT_OK;
+ }
+
+ static const int errnos[] = { 7181, 7182, 0 };
+
+ Uint32 pos = 0;
+ for (Uint32 i = 0; i<loops; i++)
+ {
+ while (errnos[pos] != 0)
+ {
+ int master = res.getMasterNodeId();
+ int next = res.getNextMasterNodeId(master);
+ int next2 = res.getNextMasterNodeId(next);
+
+ int node = (i & 1) ? next : next2;
+ ndbout_c("Tesing err: %d", errnos[pos]);
+ if (res.insertErrorInNode(next, errnos[pos]))
+ return NDBT_FAILED;
+
+ NdbSleep_SecSleep(3);
+
+ if (res.waitClusterStarted())
+ return NDBT_FAILED;
+
+ pos++;
+ }
+ pos = 0;
+ }
+
+ return NDBT_OK;
+}
+
NDBT_TESTSUITE(testNodeRestart);
TESTCASE("NoLoad",
"Test that one node at a time can be stopped and then restarted "\
@@ -1450,6 +1545,12 @@
}
TESTCASE("Bug26481", ""){
INITIALIZER(runBug26481);
+}
+TESTCASE("Bug27003", ""){
+ INITIALIZER(runBug27003);
+}
+TESTCASE("Bug27283", ""){
+ INITIALIZER(runBug27283);
}
NDBT_TESTSUITE_END(testNodeRestart);
--- 1.20/ndb/test/src/UtilTransactions.cpp 2007-03-20 16:26:56 +01:00
+++ 1.21/ndb/test/src/UtilTransactions.cpp 2007-03-20 16:26:56 +01:00
@@ -1381,6 +1381,7 @@
goto error;
}
+ row_count= 0;
{
int eof;
while((eof = pOp->nextResult(true)) == 0)
| Thread |
|---|
| • bk commit into 5.0 tree (jonas:1.2488) | jonas | 20 Mar |