Commit df3c69f4 authored by joreland@mysql.com's avatar joreland@mysql.com

New error codes + automatic nulling of tvariables

parent 73e15672
......@@ -3,7 +3,7 @@ Next NDBCNTR 1000
Next NDBFS 2000
Next DBACC 3001
Next DBTUP 4007
Next DBLQH 5036
Next DBLQH 5040
Next DBDICT 6006
Next DBDIH 7173
Next DBTC 8035
......@@ -190,6 +190,10 @@ Delay execution of ABORTREQ signal 2 seconds to generate time-out.
5035: Delay ACC_CONTOPCONT
5038: Drop LQHKEYREQ + set 5039
5039: Drop ABORT + set 5003
ERROR CODES FOR TESTING TIME-OUT HANDLING IN DBTC
-------------------------------------------------
8040:
......
......@@ -324,6 +324,31 @@ Dblqh::Dblqh(const class Configuration & conf):
addRecSignal(GSN_TUX_ADD_ATTRREF, &Dblqh::execTUX_ADD_ATTRREF);
initData();
#ifdef VM_TRACE
{
void* tmp[] = {
&addfragptr,
&attrinbufptr,
&databufptr,
&fragptr,
&gcpPtr,
&lcpPtr,
&lcpLocptr,
&logPartPtr,
&logFilePtr,
&lfoPtr,
&logPagePtr,
&pageRefPtr,
&scanptr,
&tabptr,
&tcConnectptr,
&tcNodeFailptr,
};
init_globals_list(tmp, sizeof(tmp)/sizeof(tmp[0]));
}
#endif
}//Dblqh::Dblqh()
Dblqh::~Dblqh()
......
......@@ -3190,6 +3190,13 @@ void Dblqh::execLQHKEYREQ(Signal* signal)
noFreeRecordLab(signal, lqhKeyReq, ZNO_TC_CONNECT_ERROR);
return;
}//if
if(ERROR_INSERTED(5038) &&
refToNode(signal->getSendersBlockRef()) != getOwnNodeId()){
jam();
SET_ERROR_INSERT_VALUE(5039);
return;
}
c_Counters.operations++;
......@@ -3567,6 +3574,7 @@ void Dblqh::prepareContinueAfterBlockedLab(Signal* signal)
/* -------------------------------------------------------------------------- */
/* ALSO AFTER NORMAL PROCEDURE WE CONTINUE HERE */
/* -------------------------------------------------------------------------- */
Uint32 tc_ptr_i = tcConnectptr.i;
TcConnectionrec * const regTcPtr = tcConnectptr.p;
if (regTcPtr->indTakeOver == ZTRUE) {
jam();
......@@ -3670,14 +3678,14 @@ void Dblqh::prepareContinueAfterBlockedLab(Signal* signal)
EXECUTE_DIRECT(refToBlock(regTcPtr->tcAccBlockref), GSN_ACCKEYREQ,
signal, 7 + regTcPtr->primKeyLen);
if (signal->theData[0] < RNIL) {
signal->theData[0] = tcConnectptr.i;
signal->theData[0] = tc_ptr_i;
execACCKEYCONF(signal);
return;
} else if (signal->theData[0] == RNIL) {
;
} else {
ndbrequire(signal->theData[0] == (UintR)-1);
signal->theData[0] = tcConnectptr.i;
signal->theData[0] = tc_ptr_i;
execACCKEYREF(signal);
}//if
return;
......@@ -5692,9 +5700,7 @@ void Dblqh::execABORT(Signal* signal)
BlockReference tcBlockref = signal->theData[1];
Uint32 transid1 = signal->theData[2];
Uint32 transid2 = signal->theData[3];
if (ERROR_INSERTED(5003)) {
systemErrorLab(signal);
}
CRASH_INSERTION(5003);
if (ERROR_INSERTED(5015)) {
CLEAR_ERROR_INSERT_VALUE;
sendSignalWithDelay(cownref, GSN_ABORT, signal, 2000, 4);
......@@ -5704,6 +5710,21 @@ void Dblqh::execABORT(Signal* signal)
transid2,
tcOprec) != ZOK) {
jam();
if(ERROR_INSERTED(5039) &&
refToNode(signal->getSendersBlockRef()) != getOwnNodeId()){
jam();
SET_ERROR_INSERT_VALUE(5040);
return;
}
if(ERROR_INSERTED(5040) &&
refToNode(signal->getSendersBlockRef()) != getOwnNodeId()){
jam();
SET_ERROR_INSERT_VALUE(5003);
return;
}
/* ------------------------------------------------------------------------- */
// SEND ABORTED EVEN IF NOT FOUND.
//THE TRANSACTION MIGHT NEVER HAVE ARRIVED HERE.
......@@ -10618,6 +10639,8 @@ void Dblqh::execEND_LCPCONF(Signal* signal)
clcpCompletedState = LCP_IDLE;
}//if
}//if
lcpPtr.i = 0;
ptrAss(lcpPtr, lcpRecord);
sendLCP_COMPLETE_REP(signal, lcpPtr.p->currentFragment.lcpFragOrd.lcpId);
}//Dblqh::execEND_LCPCONF()
......
......@@ -293,6 +293,23 @@ Dbtc::Dbtc(const class Configuration & conf):
addRecSignal(GSN_ALTER_TAB_REQ, &Dbtc::execALTER_TAB_REQ);
initData();
#ifdef VM_TRACE
{
void* tmp[] = { &apiConnectptr,
&tcConnectptr,
&cachePtr,
&attrbufptr,
&hostptr,
&gcpPtr,
&tmpApiConnectptr,
&timeOutptr,
&scanFragptr,
&databufptr,
&tmpDatabufptr };
init_globals_list(tmp, sizeof(tmp)/sizeof(tmp[0]));
}
#endif
}//Dbtc::Dbtc()
Dbtc::~Dbtc()
......@@ -348,5 +365,3 @@ Dbtc::~Dbtc()
BLOCK_FUNCTIONS(Dbtc);
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