diff options
author | unknown <joreland@mysql.com> | 2004-10-05 09:01:22 +0200 |
---|---|---|
committer | unknown <joreland@mysql.com> | 2004-10-05 09:01:22 +0200 |
commit | 7cf1c4d59e126fe3a79efcadffcd29eea6834fd8 (patch) | |
tree | f232980cf94066be96958b99a42849789d20956d /ndb/test/src | |
parent | e8b47674541488cddc770ab2b6991c8babbefd52 (diff) | |
download | mariadb-git-7cf1c4d59e126fe3a79efcadffcd29eea6834fd8.tar.gz |
wl2135 test prg + bug fixes
ndb/include/ndbapi/NdbConnection.hpp:
Add support for removing op from list
ndb/include/ndbapi/NdbScanOperation.hpp:
virtual destructor
ndb/src/ndbapi/NdbConnection.cpp:
Add support for removing op from list
ndb/src/ndbapi/NdbScanOperation.cpp:
Set magic number to invalid before first prepareSendScan
(so that prepareSendScan is only called once incase of restarts)
ndb/src/ndbapi/Ndblist.cpp:
Use correct type
ndb/test/src/UtilTransactions.cpp:
Update test prg.
- use LM_Read to maintain locks
- set iop = null on temporary error (restart transaction)
Diffstat (limited to 'ndb/test/src')
-rw-r--r-- | ndb/test/src/UtilTransactions.cpp | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/ndb/test/src/UtilTransactions.cpp b/ndb/test/src/UtilTransactions.cpp index 4687d63b72f..52341c0e0e6 100644 --- a/ndb/test/src/UtilTransactions.cpp +++ b/ndb/test/src/UtilTransactions.cpp @@ -1328,12 +1328,8 @@ UtilTransactions::verifyOrderedIndex(Ndb* pNdb, return NDBT_FAILED; } - NdbResultSet* rs; - if(transactional){ + NdbResultSet* rs = pOp->readTuples(NdbScanOperation::LM_Read, 0, parallelism); - } else { - rs = pOp->readTuples(NdbScanOperation::LM_CommittedRead, 0, parallelism); - } if( rs == 0 ) { ERR(pTrans->getNdbError()); @@ -1372,7 +1368,6 @@ UtilTransactions::verifyOrderedIndex(Ndb* pNdb, int eof; int rows = 0; while(check == 0 && (eof = rs->nextResult()) == 0){ - ndbout_c("Row: %d", rows); rows++; bool null_found= false; @@ -1397,8 +1392,7 @@ UtilTransactions::verifyOrderedIndex(Ndb* pNdb, if(!iop && (iop= pTrans->getNdbIndexScanOperation(indexName, tab.getName()))) { - cursor= iop->readTuples(transactional ? NdbScanOperation::LM_Read : - NdbScanOperation::LM_CommittedRead, + cursor= iop->readTuples(NdbScanOperation::LM_CommittedRead, parallelism); iop->interpret_exit_ok(); if(!cursor || get_values(iop, indexRow)) @@ -1411,11 +1405,9 @@ UtilTransactions::verifyOrderedIndex(Ndb* pNdb, if(equal(pIndex, iop, scanRow)) goto error; - else - ndbout_c("equal ok"); } - check = pTrans->execute(Commit); // commit pk read + check = pTrans->execute(NoCommit); if(check) goto error; @@ -1432,6 +1424,7 @@ UtilTransactions::verifyOrderedIndex(Ndb* pNdb, if((res= cursor->nextResult()) != 0){ g_err << "Failed to find row using index: " << res << endl; + ERR(pTrans->getNdbError()); pNdb->closeTransaction(pTrans); return NDBT_FAILED; } @@ -1451,8 +1444,6 @@ UtilTransactions::verifyOrderedIndex(Ndb* pNdb, return NDBT_FAILED; } } - pTrans->restart(); - ndbout_c("row %d ok", rows-1); } if (eof == -1 || check == -1) { @@ -1461,6 +1452,7 @@ UtilTransactions::verifyOrderedIndex(Ndb* pNdb, if (err.status == NdbError::TemporaryError){ ERR(err); + iop = 0; pNdb->closeTransaction(pTrans); NdbSleep_MilliSleep(50); retryAttempt++; |