Commit f3c0441d authored by joreland@mysql.com's avatar joreland@mysql.com

testScan - ReadWithLocksAndInserts

testBasic LocksAndInserts
parent 540de0e3
...@@ -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