Commit 408d069e authored by unknown's avatar unknown

merge

parent 66ef0f14
...@@ -1274,7 +1274,7 @@ int runScan_4006(NDBT_Context* ctx, NDBT_Step* step){ ...@@ -1274,7 +1274,7 @@ int runScan_4006(NDBT_Context* ctx, NDBT_Step* step){
const Uint32 max= 5; const Uint32 max= 5;
const NdbDictionary::Table* pTab = ctx->getTab(); const NdbDictionary::Table* pTab = ctx->getTab();
Ndb* pNdb = new Ndb("TEST_DB"); Ndb* pNdb = new Ndb(&ctx->m_cluster_connection, "TEST_DB");
if (pNdb == NULL){ if (pNdb == NULL){
ndbout << "pNdb == NULL" << endl; ndbout << "pNdb == NULL" << endl;
return NDBT_FAILED; return NDBT_FAILED;
...@@ -1293,7 +1293,7 @@ int runScan_4006(NDBT_Context* ctx, NDBT_Step* step){ ...@@ -1293,7 +1293,7 @@ int runScan_4006(NDBT_Context* ctx, NDBT_Step* step){
} }
Uint32 i; Uint32 i;
Vector<NdbResultSet*> scans; Vector<NdbScanOperation*> scans;
for(i = 0; i<10*max; i++) for(i = 0; i<10*max; i++)
{ {
NdbScanOperation* pOp = pCon->getNdbScanOperation(pTab->getName()); NdbScanOperation* pOp = pCon->getNdbScanOperation(pTab->getName());
...@@ -1304,14 +1304,13 @@ int runScan_4006(NDBT_Context* ctx, NDBT_Step* step){ ...@@ -1304,14 +1304,13 @@ int runScan_4006(NDBT_Context* ctx, NDBT_Step* step){
return NDBT_FAILED; return NDBT_FAILED;
} }
NdbResultSet* rs; if (pOp->readTuples() != 0){
if ((rs= pOp->readTuples()) == 0){
pNdb->closeTransaction(pCon); pNdb->closeTransaction(pCon);
ERR(pOp->getNdbError()); ERR(pOp->getNdbError());
delete pNdb; delete pNdb;
return NDBT_FAILED; return NDBT_FAILED;
} }
scans.push_back(rs); scans.push_back(pOp);
} }
// Dont' call any equal or setValues // Dont' call any equal or setValues
...@@ -1326,11 +1325,11 @@ int runScan_4006(NDBT_Context* ctx, NDBT_Step* step){ ...@@ -1326,11 +1325,11 @@ int runScan_4006(NDBT_Context* ctx, NDBT_Step* step){
for(i= 0; i<scans.size(); i++) for(i= 0; i<scans.size(); i++)
{ {
NdbResultSet* pOp= scans[i]; NdbScanOperation* pOp= scans[i];
while((check= pOp->nextResult()) == 0); while((check= pOp->nextResult()) == 0);
if(check != 1) if(check != 1)
{ {
ERR(pOp->getOperation()->getNdbError()); ERR(pOp->getNdbError());
pNdb->closeTransaction(pCon); pNdb->closeTransaction(pCon);
delete pNdb; delete pNdb;
return NDBT_FAILED; return NDBT_FAILED;
...@@ -1364,7 +1363,7 @@ int runScan_4006(NDBT_Context* ctx, NDBT_Step* step){ ...@@ -1364,7 +1363,7 @@ int runScan_4006(NDBT_Context* ctx, NDBT_Step* step){
return result; return result;
} }
template class Vector<NdbResultSet*>; template class Vector<NdbScanOperation*>;
NDBT_TESTSUITE(testNdbApi); NDBT_TESTSUITE(testNdbApi);
......
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