Loading ndb/src/ndbapi/NdbScanOperation.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -674,7 +674,6 @@ void NdbScanOperation::closeScan() if(m_api_receivers_count+m_conf_receivers_count){ // Send close scan ndbout_c("sending close %d %d", m_api_receivers_count, m_conf_receivers_count); send_next_scan(0, true); // Close scan } Loading ndb/test/src/UtilTransactions.cpp +83 −78 Original line number Diff line number Diff line Loading @@ -1138,19 +1138,32 @@ UtilTransactions::readRowFromTableAndIndex(Ndb* pNdb, */ NdbIndexOperation* pIndexOp= NULL; NdbIndexScanOperation *pScanOp= NULL; NdbOperation *pIOp= 0; bool null_found= false; for(a = 0; a<(int)pIndex->getNoOfColumns(); a++){ const NdbDictionary::Column * col = pIndex->getColumn(a); if (row.attributeStore(col->getName())->isNULL()) { null_found= true; break; } } const char * tabName= tab.getName(); if(!null_found) { void* pOpCheck= NULL; if (indexType == NdbDictionary::Index::UniqueHashIndex) { pOpCheck= pIndexOp= pTrans1->getNdbIndexOperation(indexName, tab.getName()); pIOp= pIndexOp= pTrans1->getNdbIndexOperation(indexName, tabName); } else { pOpCheck= pScanOp= pTrans1->getNdbIndexScanOperation(indexName, tab.getName()); pIOp= pScanOp= pTrans1->getNdbIndexScanOperation(indexName, tabName); } if (pOpCheck == NULL) { if (pIOp == NULL) { ERR(pTrans1->getNdbError()); goto close_all; } } { bool not_ok; Loading @@ -1174,20 +1187,13 @@ UtilTransactions::readRowFromTableAndIndex(Ndb* pNdb, const NdbDictionary::Column * col = pIndex->getColumn(a); int r; if (pIndexOp) r = pIndexOp->equal(col->getName(), row.attributeStore(col->getName())->aRef()); else { // setBound not possible for null attributes if ( !row.attributeStore(col->getName())->isNULL() ) { r = pScanOp->setBound(col->getName(), NdbIndexScanOperation::BoundEQ, row.attributeStore(col->getName())->aRef()); } } if (r != 0){ if(pIOp->equal(col->getName(), row.attributeStore(col->getName())->aRef()) != 0){ ERR(pTrans1->getNdbError()); goto close_all; } } #if VERBOSE printf("%s = %d: ", col->getName(), row.attributeStore(a)->aRef()); #endif Loading @@ -1203,12 +1209,8 @@ UtilTransactions::readRowFromTableAndIndex(Ndb* pNdb, for(a = 0; a<tab.getNoOfColumns(); a++){ void* pCheck; if (pIndexOp) pCheck= indexRow.attributeStore(a)= pIndexOp->getValue(tab.getColumn(a)->getName()); else pCheck= indexRow.attributeStore(a)= pScanOp->getValue(tab.getColumn(a)->getName()); pIOp->getValue(tab.getColumn(a)->getName()); if(pCheck == NULL) { ERR(pTrans1->getNdbError()); Loading @@ -1218,6 +1220,7 @@ UtilTransactions::readRowFromTableAndIndex(Ndb* pNdb, printf("%s ", tab.getColumn(a)->getName()); #endif } } #if VERBOSE printf("\n"); #endif Loading @@ -1242,6 +1245,7 @@ UtilTransactions::readRowFromTableAndIndex(Ndb* pNdb, /** * Compare the two rows */ if(!null_found){ if (pScanOp) { if (cursor->nextResult() != 0){ const NdbError err = pTrans1->getNdbError(); Loading @@ -1264,6 +1268,7 @@ UtilTransactions::readRowFromTableAndIndex(Ndb* pNdb, goto close_all; } } } return_code= NDBT_OK; goto close_all; } Loading Loading
ndb/src/ndbapi/NdbScanOperation.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -674,7 +674,6 @@ void NdbScanOperation::closeScan() if(m_api_receivers_count+m_conf_receivers_count){ // Send close scan ndbout_c("sending close %d %d", m_api_receivers_count, m_conf_receivers_count); send_next_scan(0, true); // Close scan } Loading
ndb/test/src/UtilTransactions.cpp +83 −78 Original line number Diff line number Diff line Loading @@ -1138,19 +1138,32 @@ UtilTransactions::readRowFromTableAndIndex(Ndb* pNdb, */ NdbIndexOperation* pIndexOp= NULL; NdbIndexScanOperation *pScanOp= NULL; NdbOperation *pIOp= 0; bool null_found= false; for(a = 0; a<(int)pIndex->getNoOfColumns(); a++){ const NdbDictionary::Column * col = pIndex->getColumn(a); if (row.attributeStore(col->getName())->isNULL()) { null_found= true; break; } } const char * tabName= tab.getName(); if(!null_found) { void* pOpCheck= NULL; if (indexType == NdbDictionary::Index::UniqueHashIndex) { pOpCheck= pIndexOp= pTrans1->getNdbIndexOperation(indexName, tab.getName()); pIOp= pIndexOp= pTrans1->getNdbIndexOperation(indexName, tabName); } else { pOpCheck= pScanOp= pTrans1->getNdbIndexScanOperation(indexName, tab.getName()); pIOp= pScanOp= pTrans1->getNdbIndexScanOperation(indexName, tabName); } if (pOpCheck == NULL) { if (pIOp == NULL) { ERR(pTrans1->getNdbError()); goto close_all; } } { bool not_ok; Loading @@ -1174,20 +1187,13 @@ UtilTransactions::readRowFromTableAndIndex(Ndb* pNdb, const NdbDictionary::Column * col = pIndex->getColumn(a); int r; if (pIndexOp) r = pIndexOp->equal(col->getName(), row.attributeStore(col->getName())->aRef()); else { // setBound not possible for null attributes if ( !row.attributeStore(col->getName())->isNULL() ) { r = pScanOp->setBound(col->getName(), NdbIndexScanOperation::BoundEQ, row.attributeStore(col->getName())->aRef()); } } if (r != 0){ if(pIOp->equal(col->getName(), row.attributeStore(col->getName())->aRef()) != 0){ ERR(pTrans1->getNdbError()); goto close_all; } } #if VERBOSE printf("%s = %d: ", col->getName(), row.attributeStore(a)->aRef()); #endif Loading @@ -1203,12 +1209,8 @@ UtilTransactions::readRowFromTableAndIndex(Ndb* pNdb, for(a = 0; a<tab.getNoOfColumns(); a++){ void* pCheck; if (pIndexOp) pCheck= indexRow.attributeStore(a)= pIndexOp->getValue(tab.getColumn(a)->getName()); else pCheck= indexRow.attributeStore(a)= pScanOp->getValue(tab.getColumn(a)->getName()); pIOp->getValue(tab.getColumn(a)->getName()); if(pCheck == NULL) { ERR(pTrans1->getNdbError()); Loading @@ -1218,6 +1220,7 @@ UtilTransactions::readRowFromTableAndIndex(Ndb* pNdb, printf("%s ", tab.getColumn(a)->getName()); #endif } } #if VERBOSE printf("\n"); #endif Loading @@ -1242,6 +1245,7 @@ UtilTransactions::readRowFromTableAndIndex(Ndb* pNdb, /** * Compare the two rows */ if(!null_found){ if (pScanOp) { if (cursor->nextResult() != 0){ const NdbError err = pTrans1->getNdbError(); Loading @@ -1264,6 +1268,7 @@ UtilTransactions::readRowFromTableAndIndex(Ndb* pNdb, goto close_all; } } } return_code= NDBT_OK; goto close_all; } Loading