Commit 0ac0427d authored by unknown's avatar unknown

Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb

into mysql.com:/home/jonas/src/mysql-5.0-ndb


ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Auto merged
parents 313b3e0f 79fd0904
......@@ -10041,11 +10041,20 @@ Dbdict::execBUILDINDXREQ(Signal* signal)
requestType == BuildIndxReq::RT_ALTER_INDEX ||
requestType == BuildIndxReq::RT_SYSTEMRESTART) {
jam();
const bool isLocal = req->getRequestFlag() & RequestFlag::RF_LOCAL;
NdbNodeBitmask receiverNodes = c_aliveNodes;
if (isLocal) {
receiverNodes.clear();
receiverNodes.set(getOwnNodeId());
}
if (signal->getLength() == BuildIndxReq::SignalLength) {
jam();
if (getOwnNodeId() != c_masterNodeId) {
if (!isLocal && getOwnNodeId() != c_masterNodeId) {
jam();
releaseSections(signal);
OpBuildIndex opBad;
opPtr.p = &opBad;
......@@ -10058,9 +10067,9 @@ Dbdict::execBUILDINDXREQ(Signal* signal)
}
// forward initial request plus operation key to all
req->setOpKey(++c_opRecordSequence);
NodeReceiverGroup rg(DBDICT, c_aliveNodes);
NodeReceiverGroup rg(DBDICT, receiverNodes);
sendSignal(rg, GSN_BUILDINDXREQ,
signal, BuildIndxReq::SignalLength + 1, JBB);
signal, BuildIndxReq::SignalLength + 1, JBB);
return;
}
// seize operation record
......@@ -10083,7 +10092,7 @@ Dbdict::execBUILDINDXREQ(Signal* signal)
}
c_opBuildIndex.add(opPtr);
// master expects to hear from all
opPtr.p->m_signalCounter = c_aliveNodes;
opPtr.p->m_signalCounter = receiverNodes;
buildIndex_sendReply(signal, opPtr, false);
return;
}
......@@ -10438,10 +10447,20 @@ Dbdict::buildIndex_sendSlaveReq(Signal* signal, OpBuildIndexPtr opPtr)
req->setConnectionPtr(opPtr.p->key);
req->setRequestType(opPtr.p->m_requestType);
req->addRequestFlag(opPtr.p->m_requestFlag);
opPtr.p->m_signalCounter = c_aliveNodes;
NodeReceiverGroup rg(DBDICT, c_aliveNodes);
sendSignal(rg, GSN_BUILDINDXREQ,
signal, BuildIndxReq::SignalLength, JBB);
if(opPtr.p->m_requestFlag & RequestFlag::RF_LOCAL)
{
opPtr.p->m_signalCounter.clearWaitingFor();
opPtr.p->m_signalCounter.setWaitingFor(getOwnNodeId());
sendSignal(reference(), GSN_BUILDINDXREQ,
signal, BuildIndxReq::SignalLength, JBB);
}
else
{
opPtr.p->m_signalCounter = c_aliveNodes;
NodeReceiverGroup rg(DBDICT, c_aliveNodes);
sendSignal(rg, GSN_BUILDINDXREQ,
signal, BuildIndxReq::SignalLength, JBB);
}
}
void
......
......@@ -454,7 +454,7 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3])
tFirstDataPtr = int2void(tFirstData);
if(tFirstDataPtr != 0){
tOp = void2rec_op(tFirstDataPtr);
if (tOp->checkMagicNumber() == 0) {
if (tOp->checkMagicNumber(false) == 0) {
tCon = tOp->theNdbCon;
if (tCon != NULL) {
if ((tCon->theSendStatus == NdbTransaction::sendTC_OP) ||
......@@ -467,11 +467,11 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3])
}//if
}//if
}//if
} else {
}
#ifdef VM_TRACE
ndbout_c("Recevied TCKEY_FAILREF wo/ operation");
ndbout_c("Recevied TCKEY_FAILREF wo/ operation");
#endif
}
return;
break;
}
case GSN_TCKEYREF:
......
......@@ -1323,14 +1323,14 @@ TESTCASE("NFNR2_O",
"Test that indexes are correctly maintained during node fail and node restart"){
TC_PROPERTY("OrderedIndex", 1);
TC_PROPERTY("LoggedIndexes", (unsigned)0);
TC_PROPERTY("PauseThreads", 2);
TC_PROPERTY("PauseThreads", 1);
INITIALIZER(runClearTable);
INITIALIZER(createRandomIndex);
INITIALIZER(createPkIndex);
INITIALIZER(runLoadTable);
STEP(runRestarts);
STEP(runTransactions2);
STEP(runTransactions2);
//STEP(runTransactions2);
FINALIZER(runVerifyIndex);
FINALIZER(createRandomIndex_Drop);
FINALIZER(createPkIndex_Drop);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment