Merge tulin@bk-internal.mysql.com:/users/tulin/wl1748

into poseidon.bredbandsbolaget.se:/home/tomas/mysql-4.1-ndb
parents e80c66b0 5e5178a6
......@@ -235,7 +235,6 @@ public:
enum ReturnSignal {
RS_NO_RETURN = 0,
RS_TCKEYCONF = 1,
RS_TCKEYREF = 2,
RS_TC_COMMITCONF = 3,
RS_TCROLLBACKCONF = 4,
RS_TCROLLBACKREP = 5
......@@ -699,7 +698,7 @@ public:
UintR lqhkeyreqrec;
AbortState abortState;
Uint32 buddyPtr;
Uint8 unused;
Uint8 m_exec_flag;
Uint8 unused2;
Uint8 takeOverRec;
Uint8 currentReplicaNo;
......
......@@ -1688,15 +1688,8 @@ Dbtc::TCKEY_abort(Signal* signal, int place)
case 59:{
jam();
const TcKeyReq * const tcKeyReq = (TcKeyReq *)&signal->theData[0];
const Uint32 t1 = tcKeyReq->transId1;
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);
terrorCode = ZABORTINPROGRESS;
abortErrorLab(signal);
return;
}
......@@ -2217,6 +2210,8 @@ void Dbtc::initApiConnectRec(Signal* signal,
UintR Ttransid0 = tcKeyReq->transId1;
UintR Ttransid1 = tcKeyReq->transId2;
regApiPtr->m_exec_flag = 0;
regApiPtr->returncode = 0;
regApiPtr->returnsignal = RS_TCKEYCONF;
regApiPtr->firstTcConnect = RNIL;
regApiPtr->lastTcConnect = RNIL;
......@@ -2382,6 +2377,7 @@ void Dbtc::execTCKEYREQ(Signal* signal)
bool isIndexOp = regApiPtr->isIndexOp;
bool isIndexOpReturn = regApiPtr->indexOpReturn;
regApiPtr->isIndexOp = false; // Reset marker
regApiPtr->m_exec_flag |= TexecFlag;
switch (regApiPtr->apiConnectstate) {
case CS_CONNECTED:{
if (TstartFlag == 1 && getAllowStartTransaction() == true){
......@@ -2390,6 +2386,7 @@ void Dbtc::execTCKEYREQ(Signal* signal)
//---------------------------------------------------------------------
jam();
initApiConnectRec(signal, regApiPtr);
regApiPtr->m_exec_flag = TexecFlag;
} else {
if(getAllowStartTransaction() == true){
/*------------------------------------------------------------------
......@@ -2432,6 +2429,7 @@ void Dbtc::execTCKEYREQ(Signal* signal)
//--------------------------------------------------------------------
jam();
initApiConnectRec(signal, regApiPtr);
regApiPtr->m_exec_flag = TexecFlag;
} else if(TexecFlag) {
TCKEY_abort(signal, 59);
return;
......@@ -3769,7 +3767,8 @@ void Dbtc::sendtckeyconf(Signal* signal, UintR TcommitFlag)
return; // No queued TcKeyConf
}//if
}//if
regApiPtr->m_exec_flag = 0;
TcKeyConf::setNoOfOperations(confInfo, (TopWords >> 1));
if ((TpacketLen > 25) || !is_api){
TcKeyConf * const tcKeyConf = (TcKeyConf *)signal->getDataPtrSend();
......@@ -5101,8 +5100,8 @@ void Dbtc::execTC_COMMITREQ(Signal* signal)
// We will abort it instead.
/*******************************************************************/
regApiPtr->returnsignal = RS_NO_RETURN;
abort010Lab(signal);
errorCode = ZTRANS_STATUS_ERROR;
abort010Lab(signal);
}//if
} else {
jam();
......@@ -5128,8 +5127,8 @@ void Dbtc::execTC_COMMITREQ(Signal* signal)
// transaction. We will abort it instead.
/***********************************************************************/
regApiPtr->returnsignal = RS_NO_RETURN;
abort010Lab(signal);
errorCode = ZPREPAREINPROGRESS;
abort010Lab(signal);
break;
case CS_START_COMMITTING:
......@@ -5661,7 +5660,10 @@ void Dbtc::abortErrorLab(Signal* signal)
return;
}
transP->returnsignal = RS_TCROLLBACKREP;
transP->returncode = terrorCode;
if(transP->returncode == 0){
jam();
transP->returncode = terrorCode;
}
abort010Lab(signal);
}//Dbtc::abortErrorLab()
......@@ -5989,7 +5991,8 @@ void Dbtc::timeOutFoundLab(Signal* signal, Uint32 TapiConPtr)
/* FIND OUT WHAT WE NEED TO DO BASED ON THE STATE INFORMATION.*/
/*------------------------------------------------------------------*/
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) {
case CS_STARTED:
if(apiConnectptr.p->lqhkeyreqrec == apiConnectptr.p->lqhkeyconfrec){
......@@ -6003,11 +6006,8 @@ void Dbtc::timeOutFoundLab(Signal* signal, Uint32 TapiConPtr)
jam();
return;
}//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;
abort010Lab(signal);
return;
......@@ -9385,9 +9385,9 @@ Dbtc::close_scan_req_send_conf(Signal* signal, ScanRecordPtr scanPtr){
return;
}
if(!apiFail){
Uint32 ref = apiConnectptr.p->ndbapiBlockref;
if(!apiFail && ref){
jam();
Uint32 ref = apiConnectptr.p->ndbapiBlockref;
ScanTabConf * conf = (ScanTabConf*)&signal->theData[0];
conf->apiConnectPtr = apiConnectptr.p->ndbapiConnect;
conf->requestInfo = ScanTabConf::EndOfData;
......@@ -9395,7 +9395,7 @@ Dbtc::close_scan_req_send_conf(Signal* signal, ScanRecordPtr scanPtr){
conf->transId2 = apiConnectptr.p->transid[1];
sendSignal(ref, GSN_SCAN_TABCONF, signal, ScanTabConf::SignalLength, JBB);
}
releaseScanResources(scanPtr);
if(apiFail){
......@@ -9926,48 +9926,52 @@ void Dbtc::releaseAbortResources(Signal* signal)
apiConnectptr.p->apiConnectstate = CS_ABORTING;
apiConnectptr.p->abortState = AS_IDLE;
bool ok = false;
Uint32 blockRef = apiConnectptr.p->ndbapiBlockref;
switch(apiConnectptr.p->returnsignal){
case RS_TCROLLBACKCONF:
jam();
ok = true;
signal->theData[0] = apiConnectptr.p->ndbapiConnect;
signal->theData[1] = apiConnectptr.p->transid[0];
signal->theData[2] = apiConnectptr.p->transid[1];
sendSignal(blockRef, GSN_TCROLLBACKCONF, signal, 3, JBB);
break;
case RS_TCROLLBACKREP:{
jam();
ok = true;
TcRollbackRep * const tcRollbackRep =
(TcRollbackRep *) signal->getDataPtr();
tcRollbackRep->connectPtr = apiConnectptr.p->ndbapiConnect;
tcRollbackRep->transId[0] = apiConnectptr.p->transid[0];
tcRollbackRep->transId[1] = apiConnectptr.p->transid[1];
tcRollbackRep->returnCode = apiConnectptr.p->returncode;
sendSignal(blockRef, GSN_TCROLLBACKREP, signal,
TcRollbackRep::SignalLength, JBB);
}
break;
case RS_NO_RETURN:
if(apiConnectptr.p->m_exec_flag || apiConnectptr.p->apiFailState == ZTRUE){
jam();
ok = true;
break;
case RS_TCKEYCONF:
case RS_TCKEYREF:
case RS_TC_COMMITCONF:
break;
}
if(!ok){
jam();
ndbout_c("returnsignal = %d", apiConnectptr.p->returnsignal);
sendSystemError(signal);
}//if
bool ok = false;
Uint32 blockRef = apiConnectptr.p->ndbapiBlockref;
ReturnSignal ret = apiConnectptr.p->returnsignal;
apiConnectptr.p->returnsignal = RS_NO_RETURN;
apiConnectptr.p->m_exec_flag = 0;
switch(ret){
case RS_TCROLLBACKCONF:
jam();
ok = true;
signal->theData[0] = apiConnectptr.p->ndbapiConnect;
signal->theData[1] = apiConnectptr.p->transid[0];
signal->theData[2] = apiConnectptr.p->transid[1];
sendSignal(blockRef, GSN_TCROLLBACKCONF, signal, 3, JBB);
break;
case RS_TCROLLBACKREP:{
jam();
ok = true;
TcRollbackRep * const tcRollbackRep =
(TcRollbackRep *) signal->getDataPtr();
tcRollbackRep->connectPtr = apiConnectptr.p->ndbapiConnect;
tcRollbackRep->transId[0] = apiConnectptr.p->transid[0];
tcRollbackRep->transId[1] = apiConnectptr.p->transid[1];
tcRollbackRep->returnCode = apiConnectptr.p->returncode;
sendSignal(blockRef, GSN_TCROLLBACKREP, signal,
TcRollbackRep::SignalLength, JBB);
}
break;
case RS_NO_RETURN:
jam();
ok = true;
break;
case RS_TCKEYCONF:
case RS_TC_COMMITCONF:
break;
}
if(!ok){
jam();
ndbout_c("returnsignal = %d", apiConnectptr.p->returnsignal);
sendSystemError(signal);
}//if
}
setApiConTimer(apiConnectptr.i, 0, __LINE__);
apiConnectptr.p->abortState = AS_IDLE;
if (apiConnectptr.p->apiFailState == ZTRUE) {
jam();
handleApiFailState(signal, apiConnectptr.i);
......@@ -10996,7 +11000,8 @@ void Dbtc::sendTcIndxConf(Signal* signal, UintR TcommitFlag)
TcIndxConf::setMarkerFlag(confInfo, Tmarker);
const UintR TpacketLen = 6 + TopWords;
regApiPtr->tcindxrec = 0;
regApiPtr->m_exec_flag = 0;
if ((TpacketLen > 25) || !is_api){
TcIndxConf * const tcIndxConf = (TcIndxConf *)signal->getDataPtrSend();
......
......@@ -162,7 +162,7 @@ NdbApiSignal::setSignal(int aNdbSignalType)
theTrace = TestOrd::TraceAPI;
theReceiversBlockNumber = DBTC;
theVerId_signalNumber = GSN_TCROLLBACKREQ;
theLength = 5;
theLength = 3;
}
break;
......
......@@ -665,6 +665,23 @@ void NdbScanOperation::closeScan()
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){
// Send close scan
send_next_scan(0, true); // Close scan
......
......@@ -57,11 +57,10 @@ public:
int pkDeleteRecord(Ndb*,
int recordNo,
int numRecords = 1);
int scanReadRecords(Ndb* pNdb,
Uint32 parallelism = 240, ScanLock lock = SL_Read);
int executeScanRead(Ndb*);
NdbResultSet* scanReadRecords(Ndb* pNdb, ScanLock lock = SL_Read);
int readTuples(NdbResultSet*);
int execute_Commit(Ndb*,
AbortOption ao = AbortOnError);
int execute_NoCommit(Ndb*,
......@@ -104,46 +103,6 @@ protected:
Vector<BaseString> savedRecords;
private:
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
......@@ -567,22 +567,23 @@ struct Con {
NdbDictionary::Dictionary* m_dic;
NdbConnection* m_tx;
NdbOperation* m_op;
NdbConnection* m_scantx;
NdbIndexScanOperation* m_scanop;
NdbResultSet* m_resultSet;
NdbScanOperation* m_scanop;
NdbIndexScanOperation* m_indexscanop;
NdbResultSet* m_resultset;
enum ScanMode { ScanNo = 0, Committed, Latest, Exclusive };
ScanMode m_scanmode;
enum ErrType { ErrNone = 0, ErrDeadlock, ErrOther };
ErrType m_errtype;
Con() :
m_ndb(0), m_dic(0), m_tx(0), m_op(0),
m_scantx(0), m_scanop(0), m_scanmode(ScanNo), m_errtype(ErrNone) {}
m_scanop(0), m_indexscanop(0), m_resultset(0), m_scanmode(ScanNo), m_errtype(ErrNone) {}
int connect();
void disconnect();
int startTransaction();
int startBuddyTransaction(const Con& con);
int getNdbOperation(const Tab& tab);
int getNdbOperation(const ITab& itab, const Tab& tab);
int getNdbScanOperation(const Tab& tab);
int getNdbScanOperation(const ITab& itab, const Tab& tab);
int equal(int num, const char* addr);
int getValue(int num, NdbRecAttr*& rec);
int setValue(int num, const char* addr);
......@@ -648,9 +649,18 @@ Con::getNdbOperation(const Tab& tab)
}
int
Con::getNdbOperation(const ITab& itab, const Tab& tab)
Con::getNdbScanOperation(const Tab& tab)
{
CHKCON((m_scanop = m_tx->getNdbIndexScanOperation(itab.m_name, tab.m_name)) != 0, *this);
assert(m_tx != 0);
CHKCON((m_op = m_scanop = m_tx->getNdbScanOperation(tab.m_name)) != 0, *this);
return 0;
}
int
Con::getNdbScanOperation(const ITab& itab, const Tab& tab)
{
assert(m_tx != 0);
CHKCON((m_op = m_scanop = m_indexscanop = m_tx->getNdbIndexScanOperation(itab.m_name, tab.m_name)) != 0, *this);
return 0;
}
......@@ -682,7 +692,7 @@ int
Con::setBound(int num, int type, const void* value)
{
assert(m_tx != 0 && m_op != 0);
CHKCON(m_scanop->setBound(num, type, value) == 0, *this);
CHKCON(m_indexscanop->setBound(num, type, value) == 0, *this);
return 0;
}
......@@ -698,7 +708,7 @@ int
Con::openScanRead(unsigned parallelism)
{
assert(m_tx != 0 && m_op != 0);
CHKCON((m_resultSet = m_scanop->readTuples(parallelism)) != 0, *this);
CHKCON((m_resultset = m_scanop->readTuples(parallelism)) != 0, *this);
return 0;
}
......@@ -706,7 +716,7 @@ int
Con::openScanExclusive(unsigned parallelism)
{
assert(m_tx != 0 && m_op != 0);
CHKCON((m_resultSet = m_scanop->readTuplesExclusive(parallelism)) != 0, *this);
CHKCON((m_resultset = m_scanop->readTuplesExclusive(parallelism)) != 0, *this);
return 0;
}
......@@ -721,8 +731,8 @@ int
Con::nextScanResult()
{
int ret;
assert(m_resultSet != 0);
CHKCON((ret = m_resultSet->nextResult()) != -1, *this);
assert(m_resultset != 0);
CHKCON((ret = m_resultset->nextResult()) != -1, *this);
assert(ret == 0 || ret == 1);
return ret;
}
......@@ -731,7 +741,7 @@ int
Con::takeOverForUpdate(Con& scan)
{
assert(m_tx != 0 && scan.m_op != 0);
CHKCON((m_op = scan.m_resultSet->updateTuple(m_tx)) != 0, scan);
CHKCON((m_op = scan.m_resultset->updateTuple(m_tx)) != 0, scan);
return 0;
}
......@@ -739,7 +749,7 @@ int
Con::takeOverForDelete(Con& scan)
{
assert(m_tx != 0 && scan.m_op != 0);
CHKCON(scan.m_resultSet->deleteTuple(m_tx) == 0, scan);
CHKCON(scan.m_resultset->deleteTuple(m_tx) == 0, scan);
return 0;
}
......@@ -1930,7 +1940,7 @@ scanreadtable(Par par)
LL3((par.m_verify ? "scanverify " : "scanread ") << tab.m_name);
Set set2(tab, set.m_rows);
CHK(con.startTransaction() == 0);
CHK(con.getNdbOperation(tab) == 0);
CHK(con.getNdbScanOperation(tab) == 0);
CHK(con.openScanRead(par.m_scanrd) == 0);
set2.getval(par);
CHK(con.executeScan() == 0);
......@@ -1963,7 +1973,7 @@ scanreadindex(Par par, const ITab& itab, const BSet& bset)
LL4(bset);
Set set2(tab, set.m_rows);
CHK(con.startTransaction() == 0);
CHK(con.getNdbOperation(itab, tab) == 0);
CHK(con.getNdbScanOperation(itab, tab) == 0);
CHK(con.openScanRead(par.m_scanrd) == 0);
CHK(bset.setbnd(par) == 0);
set2.getval(par);
......@@ -2030,7 +2040,7 @@ scanupdatetable(Par par)
LL3("scan update " << tab.m_name);
Set set2(tab, set.m_rows);
CHK(con.startTransaction() == 0);
CHK(con.getNdbOperation(tab) == 0);
CHK(con.getNdbScanOperation(tab) == 0);
CHK(con.openScanExclusive(par.m_scanex) == 0);
set2.getval(par);
CHK(con.executeScan() == 0);
......@@ -2075,7 +2085,7 @@ scanupdateindex(Par par, const ITab& itab, const BSet& bset)
LL3("scan update " << itab.m_name);
Set set2(tab, set.m_rows);
CHK(con.startTransaction() == 0);
CHK(con.getNdbOperation(itab, tab) == 0);
CHK(con.getNdbScanOperation(itab, tab) == 0);
CHK(con.openScanExclusive(par.m_scanex) == 0);
CHK(bset.setbnd(par) == 0);
set2.getval(par);
......
......@@ -809,58 +809,11 @@ int runExecuteScanWithoutOpenScan(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;
}
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)
return NDBT_FAILED;
else
return NDBT_OK;
int runOnlyOneScanPerTrans(NDBT_Context* ctx, NDBT_Step* step){
return NDBT_OK;
}
int runNoCloseTransaction(NDBT_Context* ctx, NDBT_Step* step){
......
......@@ -206,7 +206,7 @@ int runTimeoutTrans2(NDBT_Context* ctx, NDBT_Step* step){
// Expect that transaction has timed-out
res = hugoOps.execute_Commit(pNdb);
if(op1 != 0 && res != 237){
if(op1 != 0 && res != 266){
g_err << stepNo << ": Fail: " << res << "!= 237, op1="
<< op1 << ", op2=" << op2 << endl;
return NDBT_FAILED;
......@@ -299,9 +299,11 @@ int runBuddyTransNoTimeout(NDBT_Context* ctx, NDBT_Step* step){
for (int i = 0; i < 10; i++){
// Perform buddy scan reads
CHECK(hugoOps.scanReadRecords(pNdb) == 0);
CHECK(hugoOps.executeScanRead(pNdb) == 0);
NdbResultSet* rs = 0;
CHECK((rs = hugoOps.scanReadRecords(pNdb)) != 0);
CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
CHECK(hugoOps.readTuples(rs) == 0);
int sleep = myRandom48(maxSleep);
ndbout << "Sleeping for " << sleep << " milliseconds" << endl;
NdbSleep_MilliSleep(sleep);
......
......@@ -204,11 +204,14 @@ runOp(HugoOperations & hugoOps,
} else if(strcmp(op, "DELETE") == 0){
C2(hugoOps.pkDeleteRecord(pNdb, 1, 1) == 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){
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){
C2(hugoOps.scanReadRecords(pNdb, 240, HugoOperations::SL_Exclusive) == 0);
abort();
//C2(hugoOps.scanReadRecords(pNdb, 240, HugoOperations::SL_Exclusive)== 0);
} else {
g_err << __FILE__ << " - " << __LINE__
<< ": Unknown operation" << op << endl;
......
ndbtest_PROGRAMS = atrt
testdir=$(prefix)/mysql-test/ndb
atrt_SOURCES = main.cpp
include $(top_srcdir)/ndb/config/common.mk.am
include $(top_srcdir)/ndb/config/type_util.mk.am
include $(top_srcdir)/ndb/config/type_mgmapiclient.mk.am
ndbtest_SCRIPTS = atrt-analyze-result.sh atrt-gather-result.sh atrt-setup.sh \
test_PROGRAMS = atrt
test_DATA=daily-basic-tests.txt daily-devel-tests.txt
test_SCRIPTS=atrt-analyze-result.sh atrt-gather-result.sh atrt-setup.sh \
atrt-clear-result.sh make-config.sh make-index.sh make-html-reports.sh
EXTRA_DIST = $(ndbtest_SCRIPTS)
atrt_SOURCES = main.cpp
INCLUDES_LOC = -I$(top_srcdir)/ndb/src/mgmclient
LDADD_LOC = $(top_builddir)/ndb/src/mgmclient/CpcClient.o $(top_builddir)/ndb/src/libndbclient.la
include $(top_srcdir)/ndb/config/common.mk.am
include $(top_srcdir)/ndb/config/type_util.mk.am
include $(top_srcdir)/ndb/config/type_mgmapiclient.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
This diff is collapsed.
#
# 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,
return NDBT_OK;
}
int HugoOperations::scanReadRecords(Ndb* pNdb,
Uint32 parallelism, ScanLock lock){
#ifdef JONAS_NOT_DONE
NdbConnection * pCon = pNdb->hupp(pTrans);
NdbResultSet*
HugoOperations::scanReadRecords(Ndb* pNdb, ScanLock lock){
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) {
ERR(pCon->getNdbError());
return NDBT_FAILED;
ERR(pTrans->getNdbError());
return 0;
}
int check = 0;
NdbResultSet * rs = 0;
switch(lock){
case SL_ReadHold:
check = pOp->openScanReadHoldLock(parallelism);
rs = pOp->readTuples(NdbScanOperation::LM_Read, 1, 1);
break;
case SL_Exclusive:
check = pOp->openScanExclusive(parallelism);
rs = pOp->readTuples(NdbScanOperation::LM_Exclusive, 1, 1);
break;
case SL_Read:
default:
check = pOp->openScanRead(parallelism);
rs = pOp->readTuples(NdbScanOperation::LM_Dirty, 1, 1);
}
if( check == -1 ) {
ERR(pCon->getNdbError());
return NDBT_FAILED;
if( rs == 0) {
ERR(pTrans->getNdbError());
return 0;
}
check = pOp->interpret_exit_ok();
if( check == -1 ) {
ERR(pCon->getNdbError());
return NDBT_FAILED;
ERR(pTrans->getNdbError());
return 0;
}
// Define attributes to read
for(int a = 0; a<tab.getNoOfColumns(); a++){
if((m_tmpRow->attributeStore(a) =
pOp->getValue(tab.getColumn(a)->getName())) == 0) {
ERR(pCon->getNdbError());
return NDBT_FAILED;
ERR(pTrans->getNdbError());
return 0;
}
}
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;
#endif
return rs;
}
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){
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;
int
HugoOperations::readTuples(NdbResultSet* rs){
int res = 0;
while((res = rs->nextResult()) == 0){
}
if(res != 1)
return NDBT_FAILED;
return NDBT_OK;
}
......@@ -384,19 +354,6 @@ int HugoOperations::execute_Commit(Ndb* pNdb,
AbortOption eao){
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);
if( check == -1 ) {
......@@ -414,54 +371,9 @@ int HugoOperations::execute_Commit(Ndb* pNdb,
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 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);
if( check == -1 ) {
......@@ -701,10 +613,6 @@ HugoOperations::refresh() {
NdbConnection* t = getTransaction();
if(t)
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,
......
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