mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 14:02:32 +01:00
ndb - bug#18782
crash correct node in case of START_FRAGREF
This commit is contained in:
parent
bbbb156efb
commit
ecedd8c608
5 changed files with 33 additions and 1 deletions
|
@ -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 "
|
||||
|
|
Loading…
Reference in a new issue