Commit a5ea8cb0 authored by unknown's avatar unknown

ndb - bug#18782

  crash correct node in case of START_FRAGREF


storage/ndb/include/kernel/signaldata/SystemError.hpp:
  Add error code
storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp:
  Add error code
storage/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp:
  Add error code
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Add error code
storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp:
  Add error code
parent 8dc9ca83
......@@ -45,7 +45,8 @@ public:
CopyFragRefError = 5,
TestStopOnError = 6,
CopySubscriptionRef = 7,
CopySubscriberRef = 8
CopySubscriberRef = 8,
StartFragRefError = 9
};
Uint32 errorRef;
......
......@@ -683,6 +683,7 @@ private:
void execGETGCIREQ(Signal *);
void execDIH_RESTARTREQ(Signal *);
void execSTART_RECCONF(Signal *);
void execSTART_FRAGREF(Signal *);
void execSTART_FRAGCONF(Signal *);
void execADD_FRAGCONF(Signal *);
void execADD_FRAGREF(Signal *);
......
......@@ -251,6 +251,9 @@ Dbdih::Dbdih(Block_context& ctx):
addRecSignal(GSN_CREATE_FRAGMENTATION_REQ,
&Dbdih::execCREATE_FRAGMENTATION_REQ);
addRecSignal(GSN_START_FRAGREF,
&Dbdih::execSTART_FRAGREF);
apiConnectRecord = 0;
connectRecord = 0;
fileRecord = 0;
......
......@@ -1106,6 +1106,26 @@ void Dbdih::execSTART_FRAGCONF(Signal* signal)
return;
}//Dbdih::execSTART_FRAGCONF()
void Dbdih::execSTART_FRAGREF(Signal* signal)
{
jamEntry();
/**
* Kill starting node
*/
Uint32 errCode = signal->theData[1];
Uint32 nodeId = signal->theData[2];
SystemError * const sysErr = (SystemError*)&signal->theData[0];
sysErr->errorCode = SystemError::StartFragRefError;
sysErr->errorRef = reference();
sysErr->data1 = errCode;
sysErr->data2 = 0;
sendSignal(calcNdbCntrBlockRef(nodeId), GSN_SYSTEM_ERROR, signal,
SystemError::SignalLength, JBB);
return;
}//Dbdih::execSTART_FRAGCONF()
void Dbdih::execSTART_MEREF(Signal* signal)
{
jamEntry();
......
......@@ -205,6 +205,13 @@ void Ndbcntr::execSYSTEM_ERROR(Signal* signal)
killingNode, data1);
break;
case SystemError::StartFragRefError:
BaseString::snprintf(buf, sizeof(buf),
"Node %d killed this node because "
"it replied StartFragRef error code: %u.",
killingNode, data1);
break;
case SystemError::CopySubscriptionRef:
BaseString::snprintf(buf, sizeof(buf),
"Node %d killed this node because "
......
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