Commit 073af429 authored by unknown's avatar unknown

New error codes + automatic nulling of tvariables


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