mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
wl2126 - ndb - fix last unhandled part of read_multi_range
reading sorted multi_range with several range-scans BitKeeper/deleted/.del-NdbResultSet.hpp~e0042f4c18088ff6: Delete: ndb/include/ndbapi/NdbResultSet.hpp BitKeeper/deleted/.del-NdbResultSet.cpp~84d192cf3f42600d: Delete: ndb/src/ndbapi/NdbResultSet.cpp ndb/include/ndbapi/NdbApi.hpp: Remove NdbResultSet ndb/include/ndbapi/NdbIndexScanOperation.hpp: Remove NdbResultSet ndb/include/ndbapi/NdbScanOperation.hpp: Remove NdbResultSet ndb/src/ndbapi/Makefile.am: Remove NdbResultSet ndb/src/ndbapi/NdbConnection.cpp: Remove NdbResultSet ndb/src/ndbapi/NdbIndexOperation.cpp: Remove NdbResultSet ndb/src/ndbapi/NdbScanOperation.cpp: Remove NdbResultSet ndb/test/include/HugoOperations.hpp: Remove NdbResultSet ndb/test/ndbapi/ScanFunctions.hpp: Remove NdbResultSet ndb/test/ndbapi/ScanInterpretTest.hpp: Remove NdbResultSet ndb/test/ndbapi/bank/Bank.cpp: Remove NdbResultSet ndb/test/ndbapi/bank/BankLoad.cpp: Remove NdbResultSet ndb/test/ndbapi/slow_select.cpp: Remove NdbResultSet ndb/test/ndbapi/testBlobs.cpp: Remove NdbResultSet ndb/test/ndbapi/testDataBuffers.cpp: Remove NdbResultSet ndb/test/ndbapi/testDeadlock.cpp: Remove NdbResultSet ndb/test/ndbapi/testIndex.cpp: Remove NdbResultSet ndb/test/ndbapi/testOIBasic.cpp: Remove NdbResultSet ndb/test/ndbapi/testReadPerf.cpp: Remove NdbResultSet ndb/test/ndbapi/testScan.cpp: Remove NdbResultSet ndb/test/ndbapi/testScanPerf.cpp: Remove NdbResultSet ndb/test/src/HugoOperations.cpp: Remove NdbResultSet ndb/test/src/HugoTransactions.cpp: Remove NdbResultSet ndb/test/src/UtilTransactions.cpp: Remove NdbResultSet ndb/tools/delete_all.cpp: Remove NdbResultSet ndb/tools/select_all.cpp: Remove NdbResultSet ndb/tools/select_count.cpp: Remove NdbResultSet sql/ha_ndbcluster.cc: 1) Fix a = 3 -> a= 3 2) Impl. last part of wl2126 ordered "multi ordered scan"
This commit is contained in:
@ -81,7 +81,6 @@ ScanFunctions::scanReadFunctions(Ndb* pNdb,
|
||||
int check;
|
||||
NdbConnection *pTrans = 0;
|
||||
NdbScanOperation *pOp = 0;
|
||||
NdbResultSet *rs = 0;
|
||||
|
||||
while (true){
|
||||
if (retryAttempt >= retryMax){
|
||||
@ -111,12 +110,9 @@ ScanFunctions::scanReadFunctions(Ndb* pNdb,
|
||||
return NDBT_FAILED;
|
||||
}
|
||||
|
||||
|
||||
rs = pOp->readTuples(exclusive ?
|
||||
NdbScanOperation::LM_Exclusive :
|
||||
NdbScanOperation::LM_Read);
|
||||
|
||||
if( rs == 0 ) {
|
||||
if( pOp->readTuples(exclusive ?
|
||||
NdbScanOperation::LM_Exclusive :
|
||||
NdbScanOperation::LM_Read) ) {
|
||||
ERR(pTrans->getNdbError());
|
||||
pNdb->closeTransaction(pTrans);
|
||||
return NDBT_FAILED;
|
||||
@ -125,8 +121,7 @@ ScanFunctions::scanReadFunctions(Ndb* pNdb,
|
||||
|
||||
if (action == OnlyOpenScanOnce){
|
||||
// Call openScan one more time when it's already defined
|
||||
NdbResultSet* rs2 = pOp->readTuples(NdbScanOperation::LM_Read);
|
||||
if( rs2 == 0 ) {
|
||||
if( pOp->readTuples(NdbScanOperation::LM_Read) ) {
|
||||
ERR(pTrans->getNdbError());
|
||||
pNdb->closeTransaction(pTrans);
|
||||
return NDBT_FAILED;
|
||||
@ -168,7 +163,7 @@ ScanFunctions::scanReadFunctions(Ndb* pNdb,
|
||||
bool abortTrans = (action==CloseWithoutStop);
|
||||
int eof;
|
||||
int rows = 0;
|
||||
eof = rs->nextResult();
|
||||
eof = pOp->nextResult();
|
||||
|
||||
while(eof == 0){
|
||||
rows++;
|
||||
@ -178,7 +173,7 @@ ScanFunctions::scanReadFunctions(Ndb* pNdb,
|
||||
|
||||
if (action != CloseWithoutStop){
|
||||
// Test that we can closeTrans without stopScan
|
||||
rs->close();
|
||||
pOp->close();
|
||||
if( check == -1 ) {
|
||||
ERR(pTrans->getNdbError());
|
||||
pNdb->closeTransaction(pTrans);
|
||||
@ -201,7 +196,7 @@ ScanFunctions::scanReadFunctions(Ndb* pNdb,
|
||||
}
|
||||
}
|
||||
|
||||
eof = rs->nextResult();
|
||||
eof = pOp->nextResult();
|
||||
}
|
||||
if (eof == -1) {
|
||||
const NdbError err = pTrans->getNdbError();
|
||||
@ -211,7 +206,7 @@ ScanFunctions::scanReadFunctions(Ndb* pNdb,
|
||||
|
||||
// Be cruel, call nextScanResult after error
|
||||
for(int i=0; i<10; i++){
|
||||
eof = rs->nextResult();
|
||||
eof = pOp->nextResult();
|
||||
if(eof == 0){
|
||||
g_err << "nextScanResult returned eof = " << eof << endl
|
||||
<< " That is an error when there are no more records" << endl;
|
||||
@ -241,7 +236,7 @@ ScanFunctions::scanReadFunctions(Ndb* pNdb,
|
||||
if (action == NextScanWhenNoMore){
|
||||
g_info << "Calling nextScanresult when there are no more records" << endl;
|
||||
for(int i=0; i<10; i++){
|
||||
eof = rs->nextResult();
|
||||
eof = pOp->nextResult();
|
||||
if(eof == 0){
|
||||
g_err << "nextScanResult returned eof = " << eof << endl
|
||||
<< " That is an error when there are no more records" << endl;
|
||||
|
Reference in New Issue
Block a user