Commit 67eff35d authored by unknown's avatar unknown

Fix bank


ndb/test/ndbapi/Makefile.am:
  Removed flexScan (-noscan)
ndb/test/ndbapi/bank/Bank.cpp:
  Fixed no scan api
ndb/test/ndbapi/bank/BankLoad.cpp:
  Fixed no scan api
ndb/test/ndbapi/testBackup.cpp:
  Reenable bank
ndb/test/ndbapi/testGrep.cpp:
  Reenable bank
parent 0a3f6a1f
......@@ -9,7 +9,6 @@ create_tab \
flexAsynch \
flexBench \
flexHammer \
flexScan \
flexTT \
testBackup \
testBasic \
......@@ -40,7 +39,6 @@ drop_all_tabs_SOURCES = drop_all_tabs.cpp
flexAsynch_SOURCES = flexAsynch.cpp
flexBench_SOURCES = flexBench.cpp
flexHammer_SOURCES = flexHammer.cpp
flexScan_SOURCES = flexScan.cpp
flexTT_SOURCES = flexTT.cpp
#flexTimedAsynch_SOURCES = flexTimedAsynch.cpp
#flex_bench_mysql_SOURCES = flex_bench_mysql.cpp
......
This diff is collapsed.
......@@ -335,15 +335,15 @@ int Bank::getBalanceForAccountType(const Uint32 accountType,
return NDBT_FAILED;
}
NdbOperation* pOp = pScanTrans->getNdbOperation("ACCOUNT");
NdbScanOperation* pOp = pScanTrans->getNdbScanOperation("ACCOUNT");
if (pOp == NULL) {
ERR(pScanTrans->getNdbError());
m_ndb.closeTransaction(pScanTrans);
return NDBT_FAILED;
}
check = pOp->openScanRead(64);
if( check == -1 ) {
NdbResultSet* rs = pOp->readTuples();
if( rs == 0 ) {
ERR(pScanTrans->getNdbError());
m_ndb.closeTransaction(pScanTrans);
return NDBT_FAILED;
......@@ -370,7 +370,7 @@ int Bank::getBalanceForAccountType(const Uint32 accountType,
return NDBT_FAILED;
}
check = pScanTrans->executeScan();
check = pScanTrans->execute(NoCommit);
if( check == -1 ) {
ERR(pScanTrans->getNdbError());
m_ndb.closeTransaction(pScanTrans);
......@@ -379,7 +379,7 @@ int Bank::getBalanceForAccountType(const Uint32 accountType,
int eof;
int rows = 0;
eof = pScanTrans->nextScanResult();
eof = rs->nextResult();
while(eof == 0){
rows++;
......@@ -391,7 +391,7 @@ int Bank::getBalanceForAccountType(const Uint32 accountType,
balance += b;
}
eof = pScanTrans->nextScanResult();
eof = rs->nextResult();
}
if (eof == -1) {
ERR(pScanTrans->getNdbError());
......
......@@ -205,8 +205,6 @@ int runClearTable(NDBT_Context* ctx, NDBT_Step* step){
return NDBT_OK;
}
#if 0
#include "bank/Bank.hpp"
int runCreateBank(NDBT_Context* ctx, NDBT_Step* step){
......@@ -395,7 +393,6 @@ int runRestoreBankAndVerify(NDBT_Context* ctx, NDBT_Step* step){
return result;
}
#endif
NDBT_TESTSUITE(testBackup);
TESTCASE("BackupOne",
......@@ -413,7 +410,6 @@ TESTCASE("BackupOne",
FINALIZER(runClearTable);
}
#if 0
TESTCASE("BackupBank",
"Test that backup and restore works during transaction load\n"
" by backing up the bank"
......@@ -433,7 +429,6 @@ TESTCASE("BackupBank",
VERIFIER(runRestoreBankAndVerify);
// FINALIZER(runDropBank);
}
#endif
TESTCASE("NFMaster",
"Test that backup behaves during node failiure\n"){
INITIALIZER(setMaster);
......
......@@ -254,9 +254,7 @@ int runClearTable(NDBT_Context* ctx, NDBT_Step* step){
return NDBT_OK;
}
#if 0
#include "../bank/Bank.hpp"
#include "bank/Bank.hpp"
int runCreateBank(NDBT_Context* ctx, NDBT_Step* step){
Bank bank;
......@@ -445,7 +443,6 @@ int runRestoreBankAndVerify(NDBT_Context* ctx, NDBT_Step* step){
return result;
}
*/
#endif
NDBT_TESTSUITE(testGrep);
TESTCASE("GrepBasic",
......@@ -476,8 +473,6 @@ TESTCASE("GrepNodeRestart",
}
#if 0
TESTCASE("GrepBank",
"Test that grep and restore works during transaction load\n"
" by backing up the bank"
......@@ -498,7 +493,6 @@ TESTCASE("GrepBank",
// FINALIZER(runDropBank);
}
#endif
TESTCASE("NFMaster",
"Test that grep behaves during node failiure\n"){
......
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