Commit c9b6ed18 authored by unknown's avatar unknown

testScan - ReadWithLocksAndInserts

testBasic LocksAndInserts


ndb/test/src/HugoTransactions.cpp:
  Fix HugoTransaction::load so that transaction is closed and started if
  error is found
parent 60c4a44a
...@@ -729,10 +729,9 @@ HugoTransactions::loadTable(Ndb* pNdb, ...@@ -729,10 +729,9 @@ HugoTransactions::loadTable(Ndb* pNdb,
NdbSleep_MilliSleep(doSleep); NdbSleep_MilliSleep(doSleep);
// if (first_batch || !oneTrans) { // if (first_batch || !oneTrans) {
if (first_batch) { if (first_batch || !pTrans) {
first_batch = false; first_batch = false;
pTrans = pNdb->startTransaction(); pTrans = pNdb->startTransaction();
if (pTrans == NULL) { if (pTrans == NULL) {
const NdbError err = pNdb->getNdbError(); const NdbError err = pNdb->getNdbError();
...@@ -786,7 +785,7 @@ HugoTransactions::loadTable(Ndb* pNdb, ...@@ -786,7 +785,7 @@ HugoTransactions::loadTable(Ndb* pNdb,
if(check == -1 ) { if(check == -1 ) {
const NdbError err = pTrans->getNdbError(); const NdbError err = pTrans->getNdbError();
pNdb->closeTransaction(pTrans); pNdb->closeTransaction(pTrans);
pTrans= 0;
switch(err.status){ switch(err.status){
case NdbError::Success: case NdbError::Success:
ERR(err); ERR(err);
...@@ -828,6 +827,7 @@ HugoTransactions::loadTable(Ndb* pNdb, ...@@ -828,6 +827,7 @@ HugoTransactions::loadTable(Ndb* pNdb,
else{ else{
if (closeTrans) { if (closeTrans) {
pNdb->closeTransaction(pTrans); pNdb->closeTransaction(pTrans);
pTrans= 0;
} }
} }
......
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