Commit 4e17ed45 authored by unknown's avatar unknown

Bug fixes, related to wl1671 & BUG#4230


ndb/src/kernel/blocks/dbtc/Dbtc.hpp:
  BUG#4230
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  Only send TCROLLBACKREP when recevied TCKEYREQ with exec_flag set
ndb/src/ndbapi/NdbApiSignal.cpp:
  Fix length of TCROLLBACKREQ
ndb/src/ndbapi/NdbScanOperation.cpp:
  Wait for all TRANSID_AI before sending close scan req
ndb/test/include/HugoOperations.hpp:
  Remove hugo impl. of scan interface
ndb/test/ndbapi/testScan.cpp:
  Removed "non relevant" scan tests
ndb/test/ndbapi/testTimeout.cpp:
  Update to new scan api
ndb/test/ndbapi/testTransactions.cpp:
  tmp remove scan (not in autotest yet anyway) from testTransaction
ndb/test/src/HugoOperations.cpp:
  Remove hugo impl. of scan interface
parent df226fab
...@@ -235,7 +235,6 @@ public: ...@@ -235,7 +235,6 @@ public:
enum ReturnSignal { enum ReturnSignal {
RS_NO_RETURN = 0, RS_NO_RETURN = 0,
RS_TCKEYCONF = 1, RS_TCKEYCONF = 1,
RS_TCKEYREF = 2,
RS_TC_COMMITCONF = 3, RS_TC_COMMITCONF = 3,
RS_TCROLLBACKCONF = 4, RS_TCROLLBACKCONF = 4,
RS_TCROLLBACKREP = 5 RS_TCROLLBACKREP = 5
...@@ -699,7 +698,7 @@ public: ...@@ -699,7 +698,7 @@ public:
UintR lqhkeyreqrec; UintR lqhkeyreqrec;
AbortState abortState; AbortState abortState;
Uint32 buddyPtr; Uint32 buddyPtr;
Uint8 unused; Uint8 m_exec_flag;
Uint8 unused2; Uint8 unused2;
Uint8 takeOverRec; Uint8 takeOverRec;
Uint8 currentReplicaNo; Uint8 currentReplicaNo;
......
...@@ -1688,15 +1688,8 @@ Dbtc::TCKEY_abort(Signal* signal, int place) ...@@ -1688,15 +1688,8 @@ Dbtc::TCKEY_abort(Signal* signal, int place)
case 59:{ case 59:{
jam(); jam();
const TcKeyReq * const tcKeyReq = (TcKeyReq *)&signal->theData[0]; terrorCode = ZABORTINPROGRESS;
const Uint32 t1 = tcKeyReq->transId1; abortErrorLab(signal);
const Uint32 t2 = tcKeyReq->transId2;
signal->theData[0] = apiConnectptr.p->ndbapiConnect;
signal->theData[1] = t1;
signal->theData[2] = t2;
signal->theData[3] = ZABORTINPROGRESS;
sendSignal(apiConnectptr.p->ndbapiBlockref,
GSN_TCROLLBACKREP, signal, 4, JBB);
return; return;
} }
...@@ -2217,6 +2210,8 @@ void Dbtc::initApiConnectRec(Signal* signal, ...@@ -2217,6 +2210,8 @@ void Dbtc::initApiConnectRec(Signal* signal,
UintR Ttransid0 = tcKeyReq->transId1; UintR Ttransid0 = tcKeyReq->transId1;
UintR Ttransid1 = tcKeyReq->transId2; UintR Ttransid1 = tcKeyReq->transId2;
regApiPtr->m_exec_flag = 0;
regApiPtr->returncode = 0;
regApiPtr->returnsignal = RS_TCKEYCONF; regApiPtr->returnsignal = RS_TCKEYCONF;
regApiPtr->firstTcConnect = RNIL; regApiPtr->firstTcConnect = RNIL;
regApiPtr->lastTcConnect = RNIL; regApiPtr->lastTcConnect = RNIL;
...@@ -2382,6 +2377,7 @@ void Dbtc::execTCKEYREQ(Signal* signal) ...@@ -2382,6 +2377,7 @@ void Dbtc::execTCKEYREQ(Signal* signal)
bool isIndexOp = regApiPtr->isIndexOp; bool isIndexOp = regApiPtr->isIndexOp;
bool isIndexOpReturn = regApiPtr->indexOpReturn; bool isIndexOpReturn = regApiPtr->indexOpReturn;
regApiPtr->isIndexOp = false; // Reset marker regApiPtr->isIndexOp = false; // Reset marker
regApiPtr->m_exec_flag |= TexecFlag;
switch (regApiPtr->apiConnectstate) { switch (regApiPtr->apiConnectstate) {
case CS_CONNECTED:{ case CS_CONNECTED:{
if (TstartFlag == 1 && getAllowStartTransaction() == true){ if (TstartFlag == 1 && getAllowStartTransaction() == true){
...@@ -2390,6 +2386,7 @@ void Dbtc::execTCKEYREQ(Signal* signal) ...@@ -2390,6 +2386,7 @@ void Dbtc::execTCKEYREQ(Signal* signal)
//--------------------------------------------------------------------- //---------------------------------------------------------------------
jam(); jam();
initApiConnectRec(signal, regApiPtr); initApiConnectRec(signal, regApiPtr);
regApiPtr->m_exec_flag = TexecFlag;
} else { } else {
if(getAllowStartTransaction() == true){ if(getAllowStartTransaction() == true){
/*------------------------------------------------------------------ /*------------------------------------------------------------------
...@@ -2432,6 +2429,7 @@ void Dbtc::execTCKEYREQ(Signal* signal) ...@@ -2432,6 +2429,7 @@ void Dbtc::execTCKEYREQ(Signal* signal)
//-------------------------------------------------------------------- //--------------------------------------------------------------------
jam(); jam();
initApiConnectRec(signal, regApiPtr); initApiConnectRec(signal, regApiPtr);
regApiPtr->m_exec_flag = TexecFlag;
} else if(TexecFlag) { } else if(TexecFlag) {
TCKEY_abort(signal, 59); TCKEY_abort(signal, 59);
return; return;
...@@ -5101,8 +5099,8 @@ void Dbtc::execTC_COMMITREQ(Signal* signal) ...@@ -5101,8 +5099,8 @@ void Dbtc::execTC_COMMITREQ(Signal* signal)
// We will abort it instead. // We will abort it instead.
/*******************************************************************/ /*******************************************************************/
regApiPtr->returnsignal = RS_NO_RETURN; regApiPtr->returnsignal = RS_NO_RETURN;
abort010Lab(signal);
errorCode = ZTRANS_STATUS_ERROR; errorCode = ZTRANS_STATUS_ERROR;
abort010Lab(signal);
}//if }//if
} else { } else {
jam(); jam();
...@@ -5128,8 +5126,8 @@ void Dbtc::execTC_COMMITREQ(Signal* signal) ...@@ -5128,8 +5126,8 @@ void Dbtc::execTC_COMMITREQ(Signal* signal)
// transaction. We will abort it instead. // transaction. We will abort it instead.
/***********************************************************************/ /***********************************************************************/
regApiPtr->returnsignal = RS_NO_RETURN; regApiPtr->returnsignal = RS_NO_RETURN;
abort010Lab(signal);
errorCode = ZPREPAREINPROGRESS; errorCode = ZPREPAREINPROGRESS;
abort010Lab(signal);
break; break;
case CS_START_COMMITTING: case CS_START_COMMITTING:
...@@ -5661,7 +5659,10 @@ void Dbtc::abortErrorLab(Signal* signal) ...@@ -5661,7 +5659,10 @@ void Dbtc::abortErrorLab(Signal* signal)
return; return;
} }
transP->returnsignal = RS_TCROLLBACKREP; transP->returnsignal = RS_TCROLLBACKREP;
if(transP->returncode == 0){
jam();
transP->returncode = terrorCode; transP->returncode = terrorCode;
}
abort010Lab(signal); abort010Lab(signal);
}//Dbtc::abortErrorLab() }//Dbtc::abortErrorLab()
...@@ -5989,7 +5990,8 @@ void Dbtc::timeOutFoundLab(Signal* signal, Uint32 TapiConPtr) ...@@ -5989,7 +5990,8 @@ void Dbtc::timeOutFoundLab(Signal* signal, Uint32 TapiConPtr)
/* FIND OUT WHAT WE NEED TO DO BASED ON THE STATE INFORMATION.*/ /* FIND OUT WHAT WE NEED TO DO BASED ON THE STATE INFORMATION.*/
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
DEBUG("Time-out in state = " << apiConnectptr.p->apiConnectstate DEBUG("Time-out in state = " << apiConnectptr.p->apiConnectstate
<< " apiConnectptr.i = " << apiConnectptr.i); << " apiConnectptr.i = " << apiConnectptr.i
<< " - exec: " << apiConnectptr.p->m_exec_flag);
switch (apiConnectptr.p->apiConnectstate) { switch (apiConnectptr.p->apiConnectstate) {
case CS_STARTED: case CS_STARTED:
if(apiConnectptr.p->lqhkeyreqrec == apiConnectptr.p->lqhkeyconfrec){ if(apiConnectptr.p->lqhkeyreqrec == apiConnectptr.p->lqhkeyconfrec){
...@@ -6003,11 +6005,8 @@ void Dbtc::timeOutFoundLab(Signal* signal, Uint32 TapiConPtr) ...@@ -6003,11 +6005,8 @@ void Dbtc::timeOutFoundLab(Signal* signal, Uint32 TapiConPtr)
jam(); jam();
return; return;
}//if }//if
apiConnectptr.p->returnsignal = RS_NO_RETURN;
} else {
jam();
apiConnectptr.p->returnsignal = RS_TCROLLBACKREP;
} }
apiConnectptr.p->returnsignal = RS_TCROLLBACKREP;
apiConnectptr.p->returncode = ZTIME_OUT_ERROR; apiConnectptr.p->returncode = ZTIME_OUT_ERROR;
abort010Lab(signal); abort010Lab(signal);
return; return;
...@@ -9385,9 +9384,9 @@ Dbtc::close_scan_req_send_conf(Signal* signal, ScanRecordPtr scanPtr){ ...@@ -9385,9 +9384,9 @@ Dbtc::close_scan_req_send_conf(Signal* signal, ScanRecordPtr scanPtr){
return; return;
} }
if(!apiFail){
jam();
Uint32 ref = apiConnectptr.p->ndbapiBlockref; Uint32 ref = apiConnectptr.p->ndbapiBlockref;
if(!apiFail && ref){
jam();
ScanTabConf * conf = (ScanTabConf*)&signal->theData[0]; ScanTabConf * conf = (ScanTabConf*)&signal->theData[0];
conf->apiConnectPtr = apiConnectptr.p->ndbapiConnect; conf->apiConnectPtr = apiConnectptr.p->ndbapiConnect;
conf->requestInfo = ScanTabConf::EndOfData; conf->requestInfo = ScanTabConf::EndOfData;
...@@ -9926,9 +9925,14 @@ void Dbtc::releaseAbortResources(Signal* signal) ...@@ -9926,9 +9925,14 @@ void Dbtc::releaseAbortResources(Signal* signal)
apiConnectptr.p->apiConnectstate = CS_ABORTING; apiConnectptr.p->apiConnectstate = CS_ABORTING;
apiConnectptr.p->abortState = AS_IDLE; apiConnectptr.p->abortState = AS_IDLE;
if(apiConnectptr.p->m_exec_flag || apiConnectptr.p->apiFailState == ZTRUE){
jam();
bool ok = false; bool ok = false;
Uint32 blockRef = apiConnectptr.p->ndbapiBlockref; Uint32 blockRef = apiConnectptr.p->ndbapiBlockref;
switch(apiConnectptr.p->returnsignal){ ReturnSignal ret = apiConnectptr.p->returnsignal;
apiConnectptr.p->returnsignal = RS_NO_RETURN;
apiConnectptr.p->m_exec_flag = 0;
switch(ret){
case RS_TCROLLBACKCONF: case RS_TCROLLBACKCONF:
jam(); jam();
ok = true; ok = true;
...@@ -9956,7 +9960,6 @@ void Dbtc::releaseAbortResources(Signal* signal) ...@@ -9956,7 +9960,6 @@ void Dbtc::releaseAbortResources(Signal* signal)
ok = true; ok = true;
break; break;
case RS_TCKEYCONF: case RS_TCKEYCONF:
case RS_TCKEYREF:
case RS_TC_COMMITCONF: case RS_TC_COMMITCONF:
break; break;
} }
...@@ -9966,8 +9969,8 @@ void Dbtc::releaseAbortResources(Signal* signal) ...@@ -9966,8 +9969,8 @@ void Dbtc::releaseAbortResources(Signal* signal)
sendSystemError(signal); sendSystemError(signal);
}//if }//if
}
setApiConTimer(apiConnectptr.i, 0, __LINE__); setApiConTimer(apiConnectptr.i, 0, __LINE__);
apiConnectptr.p->abortState = AS_IDLE;
if (apiConnectptr.p->apiFailState == ZTRUE) { if (apiConnectptr.p->apiFailState == ZTRUE) {
jam(); jam();
handleApiFailState(signal, apiConnectptr.i); handleApiFailState(signal, apiConnectptr.i);
......
...@@ -162,7 +162,7 @@ NdbApiSignal::setSignal(int aNdbSignalType) ...@@ -162,7 +162,7 @@ NdbApiSignal::setSignal(int aNdbSignalType)
theTrace = TestOrd::TraceAPI; theTrace = TestOrd::TraceAPI;
theReceiversBlockNumber = DBTC; theReceiversBlockNumber = DBTC;
theVerId_signalNumber = GSN_TCROLLBACKREQ; theVerId_signalNumber = GSN_TCROLLBACKREQ;
theLength = 5; theLength = 3;
} }
break; break;
......
...@@ -665,6 +665,23 @@ void NdbScanOperation::closeScan() ...@@ -665,6 +665,23 @@ void NdbScanOperation::closeScan()
break; break;
} }
while(m_sent_receivers_count){
theNdb->theWaiter.m_node = nodeId;
theNdb->theWaiter.m_state = WAIT_SCAN;
int return_code = theNdb->receiveResponse(WAITFOR_SCAN_TIMEOUT);
switch(return_code){
case 0:
break;
case -1:
setErrorCode(4008);
case -2:
m_api_receivers_count = 0;
m_conf_receivers_count = 0;
m_sent_receivers_count = 0;
theNdbCon->theReleaseOnClose = true;
}
}
if(m_api_receivers_count+m_conf_receivers_count){ if(m_api_receivers_count+m_conf_receivers_count){
// Send close scan // Send close scan
send_next_scan(0, true); // Close scan send_next_scan(0, true); // Close scan
......
...@@ -58,9 +58,8 @@ public: ...@@ -58,9 +58,8 @@ public:
int recordNo, int recordNo,
int numRecords = 1); int numRecords = 1);
int scanReadRecords(Ndb* pNdb, NdbResultSet* scanReadRecords(Ndb* pNdb, ScanLock lock = SL_Read);
Uint32 parallelism = 240, ScanLock lock = SL_Read); int readTuples(NdbResultSet*);
int executeScanRead(Ndb*);
int execute_Commit(Ndb*, int execute_Commit(Ndb*,
AbortOption ao = AbortOnError); AbortOption ao = AbortOnError);
...@@ -104,46 +103,6 @@ protected: ...@@ -104,46 +103,6 @@ protected:
Vector<BaseString> savedRecords; Vector<BaseString> savedRecords;
private: private:
NdbConnection* pTrans; NdbConnection* pTrans;
struct ScanTmp {
ScanTmp() {
pTrans = 0;
m_tmpRow = 0;
m_delete = true;
m_op = DONE;
}
ScanTmp(NdbConnection* a, NDBT_ResultRow* b){
pTrans = a;
m_tmpRow = b;
m_delete = true;
m_op = DONE;
}
ScanTmp(const ScanTmp& org){
* this = org;
}
ScanTmp& operator=(const ScanTmp& org){
pTrans = org.pTrans;
m_tmpRow = org.m_tmpRow;
m_delete = org.m_delete;
m_op = org.m_op;
return * this;
}
~ScanTmp() {
if(m_delete && pTrans)
pTrans->close();
if(m_delete && m_tmpRow)
delete m_tmpRow;
}
NdbConnection * pTrans;
NDBT_ResultRow * m_tmpRow;
bool m_delete;
enum { DONE, READ, UPDATE, DELETE } m_op;
};
Vector<ScanTmp> m_scans;
int run(ScanTmp & tmp);
}; };
#endif #endif
...@@ -809,58 +809,11 @@ int runExecuteScanWithoutOpenScan(NDBT_Context* ctx, NDBT_Step* step){ ...@@ -809,58 +809,11 @@ int runExecuteScanWithoutOpenScan(NDBT_Context* ctx, NDBT_Step* step){
} }
int runOnlyOneOpBeforeOpenScan(NDBT_Context* ctx, NDBT_Step* step){ int runOnlyOneOpBeforeOpenScan(NDBT_Context* ctx, NDBT_Step* step){
const NdbDictionary::Table* pTab = ctx->getTab();
int records = ctx->getNumRecords();
int numFailed = 0;
ScanFunctions scanF(*pTab);
if (scanF.scanReadFunctions(GETNDB(step),
records,
6,
ScanFunctions::OnlyOneOpBeforeOpenScan,
false) == 0){
numFailed++;
}
if (scanF.scanReadFunctions(GETNDB(step),
records,
6,
ScanFunctions::OnlyOneOpBeforeOpenScan,
true) == 0){
numFailed++;
}
if(numFailed > 0)
return NDBT_FAILED;
else
return NDBT_OK; return NDBT_OK;
} }
int runOnlyOneScanPerTrans(NDBT_Context* ctx, NDBT_Step* step){
const NdbDictionary::Table* pTab = ctx->getTab();
int records = ctx->getNumRecords();
int numFailed = 0;
ScanFunctions scanF(*pTab);
if (scanF.scanReadFunctions(GETNDB(step),
records,
6,
ScanFunctions::OnlyOneScanPerTrans,
false) == 0){
numFailed++;
}
if (scanF.scanReadFunctions(GETNDB(step),
records,
6,
ScanFunctions::OnlyOneScanPerTrans,
true) == 0){
numFailed++;
}
if(numFailed > 0) int runOnlyOneScanPerTrans(NDBT_Context* ctx, NDBT_Step* step){
return NDBT_FAILED;
else
return NDBT_OK; return NDBT_OK;
} }
int runNoCloseTransaction(NDBT_Context* ctx, NDBT_Step* step){ int runNoCloseTransaction(NDBT_Context* ctx, NDBT_Step* step){
......
...@@ -206,7 +206,7 @@ int runTimeoutTrans2(NDBT_Context* ctx, NDBT_Step* step){ ...@@ -206,7 +206,7 @@ int runTimeoutTrans2(NDBT_Context* ctx, NDBT_Step* step){
// Expect that transaction has timed-out // Expect that transaction has timed-out
res = hugoOps.execute_Commit(pNdb); res = hugoOps.execute_Commit(pNdb);
if(op1 != 0 && res != 237){ if(op1 != 0 && res != 266){
g_err << stepNo << ": Fail: " << res << "!= 237, op1=" g_err << stepNo << ": Fail: " << res << "!= 237, op1="
<< op1 << ", op2=" << op2 << endl; << op1 << ", op2=" << op2 << endl;
return NDBT_FAILED; return NDBT_FAILED;
...@@ -299,8 +299,10 @@ int runBuddyTransNoTimeout(NDBT_Context* ctx, NDBT_Step* step){ ...@@ -299,8 +299,10 @@ int runBuddyTransNoTimeout(NDBT_Context* ctx, NDBT_Step* step){
for (int i = 0; i < 10; i++){ for (int i = 0; i < 10; i++){
// Perform buddy scan reads // Perform buddy scan reads
CHECK(hugoOps.scanReadRecords(pNdb) == 0); NdbResultSet* rs = 0;
CHECK(hugoOps.executeScanRead(pNdb) == 0); CHECK((rs = hugoOps.scanReadRecords(pNdb)) != 0);
CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
CHECK(hugoOps.readTuples(rs) == 0);
int sleep = myRandom48(maxSleep); int sleep = myRandom48(maxSleep);
ndbout << "Sleeping for " << sleep << " milliseconds" << endl; ndbout << "Sleeping for " << sleep << " milliseconds" << endl;
......
...@@ -204,11 +204,14 @@ runOp(HugoOperations & hugoOps, ...@@ -204,11 +204,14 @@ runOp(HugoOperations & hugoOps,
} else if(strcmp(op, "DELETE") == 0){ } else if(strcmp(op, "DELETE") == 0){
C2(hugoOps.pkDeleteRecord(pNdb, 1, 1) == 0); C2(hugoOps.pkDeleteRecord(pNdb, 1, 1) == 0);
} else if(strcmp(op, "SCAN") == 0){ } else if(strcmp(op, "SCAN") == 0){
C2(hugoOps.scanReadRecords(pNdb) == 0); abort();
//C2(hugoOps.scanReadRecords(pNdb) == 0);
} else if(strcmp(op, "SCAN-HL") == 0){ } else if(strcmp(op, "SCAN-HL") == 0){
C2(hugoOps.scanReadRecords(pNdb, 240, HugoOperations::SL_ReadHold) == 0); abort();
//C2(hugoOps.scanReadRecords(pNdb, 240, HugoOperations::SL_ReadHold)== 0);
} else if(strcmp(op, "SCAN-EX") == 0){ } else if(strcmp(op, "SCAN-EX") == 0){
C2(hugoOps.scanReadRecords(pNdb, 240, HugoOperations::SL_Exclusive) == 0); abort();
//C2(hugoOps.scanReadRecords(pNdb, 240, HugoOperations::SL_Exclusive)== 0);
} else { } else {
g_err << __FILE__ << " - " << __LINE__ g_err << __FILE__ << " - " << __LINE__
<< ": Unknown operation" << op << endl; << ": Unknown operation" << op << endl;
......
# BASIC FUNCTIONALITY
max-time: 500
cmd: testBasic
args: -n PkRead
max-time: 500
cmd: testBasic
args: -n PkUpdate
max-time: 500
cmd: testBasic
args: -n PkDelete
max-time: 500
cmd: testBasic
args: -n PkInsert
max-time: 600
cmd: testBasic
args: -n UpdateAndRead
max-time: 500
cmd: testBasic
args: -n PkReadAndLocker T6
max-time: 500
cmd: testBasic
args: -n PkReadAndLocker2 T6
max-time: 500
cmd: testBasic
args: -n PkReadUpdateAndLocker T6
max-time: 500
cmd: testBasic
args: -n ReadWithLocksAndInserts T6
max-time: 500
cmd: testBasic
args: -n PkInsertTwice T1 T6 T10
max-time: 1500
cmd: testBasic
args: -n Fill T1
max-time: 1500
cmd: testBasic
args: -n Fill T6
max-time: 500
cmd: testBasic
args: -n NoCommitSleep T6
max-time: 500
cmd: testBasic
args: -n NoCommit626 T6
max-time: 500
cmd: testBasic
args: -n NoCommitAndClose T6
max-time: 500
cmd: testBasic
args: -n Commit626 T6
max-time: 500
cmd: testBasic
args: -n CommitTry626 T6
max-time: 500
cmd: testBasic
args: -n CommitAsMuch626 T6
max-time: 500
cmd: testBasic
args: -n NoCommit626 T6
max-time: 500
cmd: testBasic
args: -n NoCommitRollback626 T1 T6
max-time: 500
cmd: testBasic
args: -n Commit630 T1 T6
max-time: 500
cmd: testBasic
args: -n CommitTry630 T1 T6
max-time: 500
cmd: testBasic
args: -n CommitAsMuch630 T1 T6
max-time: 500
cmd: testBasic
args: -n NoCommit630 T1 T6
max-time: 500
cmd: testBasic
args: -n NoCommitRollback630 T1 T6
max-time: 500
cmd: testBasic
args: -n NoCommitAndClose T1 T6
max-time: 500
cmd: testBasic
args: -n RollbackUpdate T1 T6
max-time: 500
cmd: testBasic
args: -n RollbackDeleteMultiple T1 T6
max-time: 500
cmd: testBasic
args: -n ImplicitRollbackDelete T1 T6
max-time: 500
cmd: testBasic
args: -n CommitDelete T1 T6
max-time: 500
cmd: testBasic
args: -n RollbackNothing T1 T6
max-time: 500
cmd: testBasicAsynch
args: -n PkInsertAsynch
max-time: 500
cmd: testBasicAsynch
args: -n PkReadAsynch
max-time: 500
cmd: testBasicAsynch
args: -n PkUpdateAsynch
max-time: 500
cmd: testBasicAsynch
args: -n PkDeleteAsynch
max-time: 500
cmd: testBasic
args: -n MassiveRollback T1 T6 T13
max-time: 500
cmd: testBasic
args: -n MassiveRollback2 T1 T6 T13
#-m 500 1: testBasic -n ReadConsistency T6
cmd: testTimeout
args: -n DontTimeoutTransaction T1
cmd: testTimeout
args: -n DontTimeoutTransaction5 T1
cmd: testTimeout
args: -n TimeoutTransaction T1
cmd: testTimeout
args: -n TimeoutTransaction5 T1
cmd: testTimeout
args: -n BuddyTransNoTimeout T1
cmd: testTimeout
args: -n BuddyTransNoTimeout5 T1
#
# SCAN TESTS
#
max-time: 500
cmd: testScan
args: -n ScanRead16
max-time: 500
cmd: testScan
args: -n ScanRead240
max-time: 500
cmd: testScan
args: -n ScanReadCommitted240
max-time: 500
cmd: testScan
args: -n ScanUpdate
max-time: 500
cmd: testScan
args: -n ScanUpdate2 T6
max-time: 500
cmd: testScan
args: -n ScanDelete
max-time: 500
cmd: testScan
args: -n ScanDelete2 T10
max-time: 500
cmd: testScan
args: -n ScanUpdateAndScanRead T6
max-time: 500
cmd: testScan
args: -n ScanReadAndLocker T6
max-time: 500
cmd: testScan
args: -n ScanReadAndPkRead T6
max-time: 500
cmd: testScan
args: -n ScanRead488 -l 10 T6
max-time: 600
cmd: testScan
args: -n ScanRead40 -l 100 T2
max-time: 1800
cmd: testScan
args: -n ScanRead100 -l 100 T1
max-time: 600
cmd: testScan
args: -n ScanRead40 -l 100 T1
max-time: 1800
cmd: testScan
args: -n ScanRead40RandomTable -l 100 T1
max-time: 3600
cmd: testScan
args: -n ScanRead40RandomTable -l 1000 T2
max-time: 500
cmd: testScan
args: -n ScanWithLocksAndInserts T6
max-time: 500
cmd: testScan
args: -n ScanReadAbort T6
max-time: 500
cmd: testScan
args: -n ScanReadAbort15 T6
max-time: 500
cmd: testScan
args: -n ScanReadAbort240 T6
max-time: 500
cmd: testScan
args: -n ScanUpdateAbort16 T6
max-time: 3600
cmd: testScan
args: -n ScanReadRestart T1 T6 T13
max-time: 500
cmd: testScan
args: -n ScanUpdateRestart T6
max-time: 500
cmd: testScan
args: -n CheckGetValue T6
max-time: 500
cmd: testScan
args: -n CloseWithoutStop T6
max-time: 500
cmd: testScan
args: -n NextScanWhenNoMore T6
max-time: 500
cmd: testScan
args: -n ExecuteScanWithoutOpenScan T6
max-time: 500
cmd: testScan
args: -n OnlyOpenScanOnce T6
max-time: 500
cmd: testScan
args: -n OnlyOneOpInScanTrans T6
max-time: 500
cmd: testScan
args: -n OnlyOneOpBeforeOpenScan T6
max-time: 500
cmd: testScan
args: -n OnlyOneScanPerTrans T6
max-time: 500
cmd: testScan
args: -n NoCloseTransaction T6
max-time: 500
cmd: testScan
args: -n CheckInactivityTimeOut T6
max-time: 500
cmd: testScan
args: -n CheckInactivityBeforeClose T6
max-time: 500
cmd: testScan
args: -n CheckAfterTerror T6
max-time: 500
cmd: testScan
args: -n ScanReadError5021 T1
max-time: 500
cmd: testScan
args: -n ScanReaderror5022 T1
max-time: 500
cmd: testScan
args: -n ScanReadError5023 T1
max-time: 500
cmd: testScan
args: -n ScanReadError5024 T1
max-time: 500
cmd: testScan
args: -n ScanReadError5025 T1
max-time: 500
cmd: testScan
args: -n ScanReadError5030 T1
# OLD FLEX
max-time: 500
cmd: flexBench
args: -c 25 -t 10
max-time: 500
cmd: flexHammer
args: -r 5 -t 32
#
# DICT TESTS
max-time: 1500
cmd: testDict
args: -n CreateAndDrop
max-time: 1500
cmd: testDict
args: -n CreateAndDropWithData
max-time: 1500
cmd: testDict
args: -n CreateAndDropDuring T6 T10
max-time: 1500
cmd: testDict
args: -n CreateInvalidTables
max-time: 1500
cmd: testDict
args: -n CreateTableWhenDbIsFull T6
max-time: 1500
cmd: testDict
args: -n CreateMaxTables T6
max-time: 500
cmd: testDict
args: -n FragmentTypeSingle T1
max-time: 1500
cmd: testDict
args: -n FragmentTypeAll T1 T6 T7 T8
max-time: 1500
cmd: testDict
args: -n FragmentTypeAllLarge T1 T6 T7 T8
max-time: 1500
cmd: testDict
args: -n TemporaryTables T1 T6 T7 T8
#
# TEST NDBAPI
#
max-time: 500
cmd: testDataBuffers
args:
# Testsuite: testNdbApi
# Number of tests: 5
max-time: 500
cmd: testNdbApi
args: -n MaxNdb T6
max-time: 500
cmd: testNdbApi
args: -n MaxTransactions T1 T6 T7 T8 T13
max-time: 500
cmd: testNdbApi
args: -n MaxOperations T1 T6 T7 T8 T13
max-time: 500
cmd: testNdbApi
args: -n MaxGetValue T1 T6 T7 T8 T13
max-time: 500
cmd: testNdbApi
args: -n MaxEqual
max-time: 500
cmd: testNdbApi
args: -n DeleteNdb T1 T6
max-time: 500
cmd: testNdbApi
args: -n WaitUntilReady T1 T6 T7 T8 T13
max-time: 500
cmd: testNdbApi
args: -n GetOperationNoTab T6
max-time: 500
cmd: testNdbApi
args: -n NdbErrorOperation T6
max-time: 500
cmd: testNdbApi
args: -n MissingOperation T6
max-time: 500
cmd: testNdbApi
args: -n GetValueInUpdate T6
max-time: 500
cmd: testNdbApi
args: -n UpdateWithoutKeys T6
max-time: 500
cmd: testNdbApi
args: -n UpdateWithoutValues T6
max-time: 500
cmd: testInterpreter
args: T1
max-time: 1500
cmd: testOperations
args: -n ReadRead
max-time: 1500
cmd: testOperations
args: -n ReadReadEx
max-time: 1500
cmd: testOperations
args: -n ReadInsert
max-time: 1500
cmd: testOperations
args: -n ReadUpdate
max-time: 1500
cmd: testOperations
args: -n ReadDelete
max-time: 1500
cmd: testOperations
args: -n FReadRead
max-time: 1500
cmd: testOperations
args: -n FReadReadEx
max-time: 1500
cmd: testOperations
args: -n FReadInsert
max-time: 1500
cmd: testOperations
args: -n FReadUpdate
max-time: 1500
cmd: testOperations
args: -n FReadDelete
max-time: 1500
cmd: testOperations
args: -n ReadExRead
max-time: 1500
cmd: testOperations
args: -n ReadExReadEx
max-time: 1500
cmd: testOperations
args: -n ReadExInsert
max-time: 1500
cmd: testOperations
args: -n ReadExUpdate
max-time: 1500
cmd: testOperations
args: -n ReadExDelete
max-time: 1500
cmd: testOperations
args: -n InsertRead
max-time: 1500
cmd: testOperations
args: -n InsertReadEx
max-time: 1500
cmd: testOperations
args: -n InsertInsert
max-time: 1500
cmd: testOperations
args: -n InsertUpdate
max-time: 1500
cmd: testOperations
args: -n InsertDelete
max-time: 1500
cmd: testOperations
args: -n UpdateRead
max-time: 1500
cmd: testOperations
args: -n UpdateReadEx
max-time: 1500
cmd: testOperations
args: -n UpdateInsert
max-time: 1500
cmd: testOperations
args: -n UpdateUpdate
max-time: 1500
cmd: testOperations
args: -n UpdateDelete
max-time: 1500
cmd: testOperations
args: -n DeleteRead
max-time: 1500
cmd: testOperations
args: -n DeleteReadEx
max-time: 1500
cmd: testOperations
args: -n DeleteInsert
max-time: 1500
cmd: testOperations
args: -n DeleteUpdate
max-time: 1500
cmd: testOperations
args: -n DeleteDelete
max-time: 1500
cmd: testOperations
args: -n ReadSimpleRead
max-time: 1500
cmd: testOperations
args: -n ReadDirtyRead
max-time: 1500
cmd: testOperations
args: -n FReadSimpleRead
max-time: 1500
cmd: testOperations
args: -n FReadDirtyRead
max-time: 1500
cmd: testOperations
args: -n ReadExSimpleRead
max-time: 1500
cmd: testOperations
args: -n ReadExDirtyRead
max-time: 1500
cmd: testOperations
args: -n InsertSimpleRead
max-time: 1500
cmd: testOperations
args: -n InsertDirtyRead
max-time: 1500
cmd: testOperations
args: -n UpdateSimpleRead
max-time: 1500
cmd: testOperations
args: -n UpdateDirtyRead
max-time: 1500
cmd: testOperations
args: -n DeleteSimpleRead
max-time: 1500
cmd: testOperations
args: -n DeleteDirtyRead
max-time: 1500
cmd: testTransactions
args: -n ReadRead
max-time: 1500
cmd: testTransactions
args: -n ReadReadEx
max-time: 1500
cmd: testTransactions
args: -n ReadInsert
max-time: 1500
cmd: testTransactions
args: -n ReadUpdate
max-time: 1500
cmd: testTransactions
args: -n ReadDelete
max-time: 1500
cmd: testTransactions
args: -n ReadExRead
max-time: 1500
cmd: testTransactions
args: -n ReadExReadEx
max-time: 1500
cmd: testTransactions
args: -n ReadExInsert
max-time: 1500
cmd: testTransactions
args: -n ReadExUpdate
max-time: 1500
cmd: testTransactions
args: -n ReadExDelete
max-time: 1500
cmd: testTransactions
args: -n InsertRead
max-time: 1500
cmd: testTransactions
args: -n InsertReadEx
max-time: 1500
cmd: testTransactions
args: -n InsertInsert
max-time: 1500
cmd: testTransactions
args: -n InsertUpdate
max-time: 1500
cmd: testTransactions
args: -n InsertDelete
max-time: 1500
cmd: testTransactions
args: -n UpdateRead
max-time: 1500
cmd: testTransactions
args: -n UpdateReadEx
max-time: 1500
cmd: testTransactions
args: -n UpdateInsert
max-time: 1500
cmd: testTransactions
args: -n UpdateUpdate
max-time: 1500
cmd: testTransactions
args: -n UpdateDelete
max-time: 1500
cmd: testTransactions
args: -n DeleteRead
max-time: 1500
cmd: testTransactions
args: -n DeleteReadEx
max-time: 1500
cmd: testTransactions
args: -n DeleteInsert
max-time: 1500
cmd: testTransactions
args: -n DeleteUpdate
max-time: 1500
cmd: testTransactions
args: -n DeleteDelete
max-time: 1500
cmd: testTransactions
args: -n ReadSimpleRead
max-time: 1500
cmd: testTransactions
args: -n ReadDirtyRead
max-time: 1500
cmd: testTransactions
args: -n ReadExSimpleRead
max-time: 1500
cmd: testTransactions
args: -n ReadExDirtyRead
max-time: 1500
cmd: testTransactions
args: -n InsertSimpleRead
max-time: 1500
cmd: testTransactions
args: -n InsertDirtyRead
max-time: 1500
cmd: testTransactions
args: -n UpdateSimpleRead
max-time: 1500
cmd: testTransactions
args: -n UpdateDirtyRead
max-time: 1500
cmd: testTransactions
args: -n DeleteSimpleRead
max-time: 1500
cmd: testTransactions
args: -n DeleteDirtyRead
max-time: 1500
cmd: testRestartGci
args: T6
max-time: 300
cmd: testBlobs
args:
#
# INDEX
#
max-time: 1500
cmd: testIndex
args: -n CreateAll
#-m 7200 1: testIndex -n InsertDeleteGentle T7
max-time: 3600
cmd: testIndex
args: -n InsertDelete T1 T10
#-m 3600 1: testIndex -n CreateLoadDropGentle T7
max-time: 3600
cmd: testIndex
args: -n CreateLoadDrop T1 T10
#
# BACKUP
#
max-time: 600
cmd: testBackup
args: -n BackupOne
max-time: 600
cmd: testBackup
args: -n BackupBank T6
#
# MGMAPI AND MGSRV
#
max-time: 1800
cmd: testMgm
args: -n SingleUserMode T1
#
#
# SYSTEM RESTARTS
#
max-time: 1500
cmd: testSystemRestart
args: -n SR1 T1
max-time: 1500
cmd: testSystemRestart
args: -n SR1 T6
max-time: 1500
cmd: testSystemRestart
args: -n SR1 T7
max-time: 1500
cmd: testSystemRestart
args: -n SR1 T8
max-time: 1500
cmd: testSystemRestart
args: -n SR2 T1
max-time: 1500
cmd: testSystemRestart
args: -n SR2 T6
max-time: 1500
cmd: testSystemRestart
args: -n SR2 T7
max-time: 1500
cmd: testSystemRestart
args: -n SR_UNDO T1
max-time: 1500
cmd: testSystemRestart
args: -n SR_UNDO T6
max-time: 1500
cmd: testSystemRestart
args: -n SR_UNDO T7
max-time: 1500
cmd: testSystemRestart
args: -n SR_UNDO T8
max-time: 1500
cmd: testSystemRestart
args: -n SR3 T6
max-time: 1500
cmd: testSystemRestart
args: -n SR4 T6
#
max-time: 1500
cmd: testSystemRestart
args: -n SR_FULLDB T1
#
# NODE RESTARTS
#
max-time: 2500
cmd: testNodeRestart
args: -n NoLoad T6 T8 T13
max-time: 2500
cmd: testNodeRestart
args: -n PkRead T6 T8 T13
max-time: 2500
cmd: testNodeRestart
args: -l 1 -n PkReadPkUpdate
max-time: 2500
cmd: testNodeRestart
args: -l 1 -n ReadUpdateScan
max-time: 2500
cmd: testNodeRestart
args: -n Terror T6 T13
max-time: 2500
cmd: testNodeRestart
args: -n FullDb T6 T13
max-time: 2500
cmd: testNodeRestart
args: -n RestartRandomNode T6 T13
max-time: 2500
cmd: testNodeRestart
args: -n RestartRandomNodeError T6 T13
max-time: 2500
cmd: testNodeRestart
args: -n RestartRandomNodeInitial T6 T13
max-time: 3600
cmd: testNodeRestart
args: -l 1 -n RestartNFDuringNR T6 T13
max-time: 2500
cmd: testNodeRestart
args: -n RestartMasterNodeError T6 T8 T13
max-time: 3600
cmd: testNodeRestart
args: -n RestartNodeDuringLCP T6
max-time: 2500
cmd: testNodeRestart
args: -n TwoNodeFailure T6 T8 T13
max-time: 2500
cmd: testNodeRestart
args: -n TwoMasterNodeFailure T6 T8 T13
max-time: 2500
cmd: testNodeRestart
args: -n FiftyPercentFail T6 T8 T13
max-time: 2500
cmd: testNodeRestart
args: -n RestartAllNodes T6 T8 T13
max-time: 2500
cmd: testNodeRestart
args: -n RestartAllNodesAbort T6 T8 T13
max-time: 2500
cmd: testNodeRestart
args: -n RestartAllNodesError9999 T6 T8 T13
max-time: 2500
cmd: testNodeRestart
args: -n FiftyPercentStopAndWait T6 T8 T13
max-time: 500
cmd: testNodeRestart
args: -n StopOnError T1
#
max-time: 2500
cmd: testIndex
args: -n NFNR1 T6 T13
max-time: 2500
cmd: testIndex
args: -n NFNR2 T6 T13
max-time: 2500
cmd: testIndex
args: -n NFNR3 T6 T13
max-time: 2500
cmd: testIndex
args: -n BuildDuring T6
max-time: 2500
cmd: testIndex
args: -l 2 -n SR1 T6 T13
max-time: 2500
cmd: testIndex
args: -n NFNR1_O T6 T13
max-time: 2500
cmd: testIndex
args: -n NFNR2_O T6 T13
max-time: 2500
cmd: testIndex
args: -n NFNR3_O T6 T13
max-time: 2500
cmd: testIndex
args: -n BuildDuring_O T6
max-time: 2500
cmd: testIndex
args: -l 2 -n SR1_O T6 T13
max-time: 500
cmd: testIndex
args: -n MixedTransaction T1
max-time: 2500
cmd: testDict
args: -n NF1 T1 T6 T13
max-time: 2500
cmd: test_event
args: -n BasicEventOperation T1 T6
max-time: 2500
cmd: testOIBasic
args:
...@@ -292,91 +292,61 @@ int HugoOperations::pkDeleteRecord(Ndb* pNdb, ...@@ -292,91 +292,61 @@ int HugoOperations::pkDeleteRecord(Ndb* pNdb,
return NDBT_OK; return NDBT_OK;
} }
int HugoOperations::scanReadRecords(Ndb* pNdb, NdbResultSet*
Uint32 parallelism, ScanLock lock){ HugoOperations::scanReadRecords(Ndb* pNdb, ScanLock lock){
#ifdef JONAS_NOT_DONE
NdbConnection * pCon = pNdb->hupp(pTrans);
NDBT_ResultRow * m_tmpRow = new NDBT_ResultRow(tab); NDBT_ResultRow * m_tmpRow = new NDBT_ResultRow(tab);
ScanTmp tmp(pCon, m_tmpRow);
tmp.m_op = ScanTmp::READ;
NdbOperation* pOp = pCon->getNdbOperation(tab.getName()); NdbScanOperation* pOp = pTrans->getNdbScanOperation(tab.getName());
if (pOp == NULL) { if (pOp == NULL) {
ERR(pCon->getNdbError()); ERR(pTrans->getNdbError());
return NDBT_FAILED; return 0;
} }
int check = 0; int check = 0;
NdbResultSet * rs = 0;
switch(lock){ switch(lock){
case SL_ReadHold: case SL_ReadHold:
check = pOp->openScanReadHoldLock(parallelism); rs = pOp->readTuples(NdbScanOperation::LM_Read, 1, 1);
break; break;
case SL_Exclusive: case SL_Exclusive:
check = pOp->openScanExclusive(parallelism); rs = pOp->readTuples(NdbScanOperation::LM_Exclusive, 1, 1);
break; break;
case SL_Read: case SL_Read:
default: default:
check = pOp->openScanRead(parallelism); rs = pOp->readTuples(NdbScanOperation::LM_Dirty, 1, 1);
} }
if( check == -1 ) { if( rs == 0) {
ERR(pCon->getNdbError()); ERR(pTrans->getNdbError());
return NDBT_FAILED; return 0;
} }
check = pOp->interpret_exit_ok(); check = pOp->interpret_exit_ok();
if( check == -1 ) { if( check == -1 ) {
ERR(pCon->getNdbError()); ERR(pTrans->getNdbError());
return NDBT_FAILED; return 0;
} }
// Define attributes to read // Define attributes to read
for(int a = 0; a<tab.getNoOfColumns(); a++){ for(int a = 0; a<tab.getNoOfColumns(); a++){
if((m_tmpRow->attributeStore(a) = if((m_tmpRow->attributeStore(a) =
pOp->getValue(tab.getColumn(a)->getName())) == 0) { pOp->getValue(tab.getColumn(a)->getName())) == 0) {
ERR(pCon->getNdbError()); ERR(pTrans->getNdbError());
return NDBT_FAILED;
}
}
check = tmp.pTrans->executeScan();
if( check == -1 ) {
NdbError err = tmp.pTrans->getNdbError();
ERR(err);
return err.code;
}
tmp.m_delete = false;
m_scans.push_back(tmp);
return 0; return 0;
#endif
}
int HugoOperations::executeScanRead(Ndb* pNdb){
int check = 0;
for(Uint32 i = 0; i<m_scans.size(); i++){
ScanTmp & tmp = m_scans[i];
check = run(tmp);
if(check != 0){
return check;
} }
} }
while(m_scans.size() > 0){ return rs;
ScanTmp & tmp = m_scans[m_scans.size() - 1]; }
if(tmp.m_op != ScanTmp::DONE)
abort();
tmp.pTrans->close(); int
delete tmp.m_tmpRow; HugoOperations::readTuples(NdbResultSet* rs){
m_scans.erase(m_scans.size() - 1); int res = 0;
} while((res = rs->nextResult()) == 0){
if(check != 0){
return check;
} }
if(res != 1)
return NDBT_FAILED;
return NDBT_OK; return NDBT_OK;
} }
...@@ -384,19 +354,6 @@ int HugoOperations::execute_Commit(Ndb* pNdb, ...@@ -384,19 +354,6 @@ int HugoOperations::execute_Commit(Ndb* pNdb,
AbortOption eao){ AbortOption eao){
int check = 0; int check = 0;
while(m_scans.size() > 0){
ScanTmp & tmp = m_scans[m_scans.size() - 1];
if(tmp.m_op != ScanTmp::DONE)
abort();
tmp.pTrans->close();
delete tmp.m_tmpRow;
m_scans.erase(m_scans.size() - 1);
}
if(check != 0){
return check;
}
check = pTrans->execute(Commit, eao); check = pTrans->execute(Commit, eao);
if( check == -1 ) { if( check == -1 ) {
...@@ -414,54 +371,9 @@ int HugoOperations::execute_Commit(Ndb* pNdb, ...@@ -414,54 +371,9 @@ int HugoOperations::execute_Commit(Ndb* pNdb,
return NDBT_OK; return NDBT_OK;
} }
int
HugoOperations::run(ScanTmp & tmp){
#if JONAS_NOT_DONE
int count = 0;
if(tmp.m_op == ScanTmp::DONE)
abort();
int eof = tmp.pTrans->nextScanResult(true) ;
while(eof == 0){
count++;
switch(tmp.m_op){
case ScanTmp::READ:
case ScanTmp::UPDATE:
case ScanTmp::DELETE:
break;
case ScanTmp::DONE:
abort();
}
rows.push_back(tmp.m_tmpRow->clone());
eof = tmp.pTrans->nextScanResult(false);
}
tmp.m_op = ScanTmp::DONE;
if (eof == -1) {
deallocRows();
NdbError err = tmp.pTrans->getNdbError();
ERR(err);
return err.code;
}
if(count == 0)
return 626;
#endif
return 0;
}
int HugoOperations::execute_NoCommit(Ndb* pNdb, AbortOption eao){ int HugoOperations::execute_NoCommit(Ndb* pNdb, AbortOption eao){
int check; int check;
for(Uint32 i = 0; i<m_scans.size(); i++){
ScanTmp & tmp = m_scans[i];
check = run(tmp);
if(check != 0){
return check;
}
}
check = pTrans->execute(NoCommit, eao); check = pTrans->execute(NoCommit, eao);
if( check == -1 ) { if( check == -1 ) {
...@@ -701,10 +613,6 @@ HugoOperations::refresh() { ...@@ -701,10 +613,6 @@ HugoOperations::refresh() {
NdbConnection* t = getTransaction(); NdbConnection* t = getTransaction();
if(t) if(t)
t->refresh(); t->refresh();
for(Uint32 i = 0; i<m_scans.size(); i++){
if(m_scans[i].pTrans)
m_scans[i].pTrans->refresh();
}
} }
int HugoOperations::indexReadRecords(Ndb*, const char * idxName, int recordNo, int HugoOperations::indexReadRecords(Ndb*, const char * idxName, int recordNo,
......
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