Commit bb85fdaf authored by unknown's avatar unknown

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

into mysql.com:/home/jonas/src/mysql-4.1
parents a50fafa4 795cd673
......@@ -69,6 +69,9 @@
#include <signaldata/FsOpenReq.hpp>
#include <DebuggerNames.hpp>
#include <EventLogger.hpp>
extern EventLogger g_eventLogger;
#define SYSFILE ((Sysfile *)&sysfileData[0])
#define RETURN_IF_NODE_NOT_ALIVE(node) \
......@@ -13103,6 +13106,48 @@ Dbdih::execDUMP_STATE_ORD(Signal* signal)
}
}
}
if(dumpState->args[0] == 7019 && signal->getLength() == 2)
{
char buf2[8+1];
NodeRecordPtr nodePtr;
nodePtr.i = signal->theData[1];
ptrCheckGuard(nodePtr, MAX_NDB_NODES, nodeRecord);
infoEvent("NF Node %d tc: %d lqh: %d dih: %d dict: %d recNODE_FAILREP: %d",
nodePtr.i,
nodePtr.p->dbtcFailCompleted,
nodePtr.p->dblqhFailCompleted,
nodePtr.p->dbdihFailCompleted,
nodePtr.p->dbdictFailCompleted,
nodePtr.p->recNODE_FAILREP);
infoEvent(" m_NF_COMPLETE_REP: %s m_nodefailSteps: %s",
nodePtr.p->m_NF_COMPLETE_REP.getText(),
nodePtr.p->m_nodefailSteps.getText(buf2));
}
if(dumpState->args[0] == 7020 && signal->getLength() > 3)
{
Uint32 gsn= signal->theData[1];
Uint32 block= signal->theData[2];
Uint32 length= signal->length() - 3;
memmove(signal->theData, signal->theData+3, 4*length);
sendSignal(numberToRef(block, getOwnNodeId()), gsn, signal, length, JBB);
warningEvent("-- SENDING CUSTOM SIGNAL --");
char buf[100], buf2[100];
buf2[0]= 0;
for(Uint32 i = 0; i<length; i++)
{
snprintf(buf, 100, "%s %.8x", buf2, signal->theData[i]);
snprintf(buf2, 100, "%s", buf);
}
warningEvent("gsn: %d block: %s, length: %d theData: %s",
gsn, getBlockName(block, "UNKNOWN"), length, buf);
g_eventLogger.warning("-- SENDING CUSTOM SIGNAL --");
g_eventLogger.warning("gsn: %d block: %s, length: %d theData: %s",
gsn, getBlockName(block, "UNKNOWN"), length, buf);
}
if(dumpState->args[0] == DumpStateOrd::DihDumpLCPState){
infoEvent("-- Node %d LCP STATE --", getOwnNodeId());
......
......@@ -58,7 +58,9 @@ int main(int argc, char** argv)
// Print to stdout/console
g_eventLogger.createConsoleHandler();
g_eventLogger.setCategory("NDB");
g_eventLogger.enable(Logger::LL_ON, Logger::LL_CRITICAL);
g_eventLogger.enable(Logger::LL_ON, Logger::LL_ERROR);
g_eventLogger.enable(Logger::LL_ON, Logger::LL_WARNING);
globalEmulatorData.create();
......
......@@ -2061,7 +2061,7 @@ MgmtSrvr::handleStopReply(NodeId nodeId, Uint32 errCode)
}
void
MgmtSrvr::handleStatus(NodeId nodeId, bool alive)
MgmtSrvr::handleStatus(NodeId nodeId, bool alive, bool nfComplete)
{
DBUG_ENTER("MgmtSrvr::handleStatus");
Uint32 theData[25];
......@@ -2070,9 +2070,14 @@ MgmtSrvr::handleStatus(NodeId nodeId, bool alive)
m_started_nodes.push_back(nodeId);
theData[0] = EventReport::Connected;
} else {
handleStopReply(nodeId, 0);
theData[0] = EventReport::Disconnected;
if(nfComplete)
{
handleStopReply(nodeId, 0);
DBUG_VOID_RETURN;
}
}
eventReport(_ownNodeId, theData);
DBUG_VOID_RETURN;
}
......@@ -2097,8 +2102,7 @@ MgmtSrvr::nodeStatusNotification(void* mgmSrv, Uint32 nodeId,
{
DBUG_ENTER("MgmtSrvr::nodeStatusNotification");
DBUG_PRINT("enter",("nodeid= %d, alive= %d, nfComplete= %d", nodeId, alive, nfComplete));
if(!(!alive && nfComplete))
((MgmtSrvr*)mgmSrv)->handleStatus(nodeId, alive);
((MgmtSrvr*)mgmSrv)->handleStatus(nodeId, alive, nfComplete);
DBUG_VOID_RETURN;
}
......
......@@ -573,7 +573,7 @@ private:
// Returns: -
//**************************************************************************
void handleStatus(NodeId nodeId, bool alive);
void handleStatus(NodeId nodeId, bool alive, bool nfComplete);
//**************************************************************************
// Description: Handle the death of a process
// Parameters:
......
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