From: Pekka Nousiainen Date: December 3 2012 3:01pm Subject: bzr push into mysql-5.1-telco-6.3 branch (pekka.nousiainen:3515 to 3519) Bug#14702377 List-Archive: http://lists.mysql.com/commits/145430 X-Bug: 14702377 Message-Id: <20121203150145.1264.81664.3519@cuda> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3519 Pekka Nousiainen 2012-12-03 bug#14702377 b05_upg.diff setNdbError in HugoTransactions, more modified: storage/ndb/test/src/HugoTransactions.cpp 3518 Pekka Nousiainen 2012-12-03 bug#14702377 b04_upg.diff testUpgrade for the bug modified: storage/ndb/test/ndbapi/testUpgrade.cpp storage/ndb/test/run-test/upgrade-tests.txt 3517 Pekka Nousiainen 2012-12-03 bug#14702377 b03_upg.diff testUpgrade: improve b01_upg of bug#13834481 modified: storage/ndb/test/ndbapi/testUpgrade.cpp 3516 Pekka Nousiainen 2012-12-03 bug#14702377 b02_upg.diff setNdbError in HugoTransactions modified: storage/ndb/test/src/HugoTransactions.cpp 3515 Martin Skold 2012-11-23 Removed typecast causing compiler warning modified: sql/ha_ndbcluster_binlog.cc === modified file 'storage/ndb/test/ndbapi/testUpgrade.cpp' --- a/storage/ndb/test/ndbapi/testUpgrade.cpp 2012-05-03 09:52:53 +0000 +++ b/storage/ndb/test/ndbapi/testUpgrade.cpp 2012-12-03 08:20:58 +0000 @@ -23,6 +23,7 @@ #include #include #include +#include static Vector table_list; @@ -438,6 +439,19 @@ runUpgrade_Half(NDBT_Context* ctx, NDBT_ return NDBT_FAILED; } + ndbout << "Half started" << endl; + + if (ctx->getProperty("HalfStartedHold", (Uint32)0) != 0) + { + while (ctx->getProperty("HalfStartedHold", (Uint32)0) != 0) + { + ndbout << "Half started holding..." << endl; + ctx->setProperty("HalfStartedDone", (Uint32)1); + NdbSleep_SecSleep(30); + } + ndbout << "Got half started continue..." << endl; + } + // Restart the remaining nodes cnt= 0; for (Uint32 i = 0; (igetDictionary(); + int records = ctx->getNumRecords(); + int result = NDBT_OK; + + while (ctx->getProperty("HalfStartedDone", (Uint32)0) == 0) + { + ndbout << "Wait for half started..." << endl; + NdbSleep_SecSleep(15); + } + ndbout << "Got half started" << endl; + + while (1) + { + assert(table_list.size() == 1); + const char* tabname = table_list[0].c_str(); + const NdbDictionary::Table* tab = 0; + CHK2((tab = pDict->getTable(tabname)) != 0, + tabname << ": " << pDict->getNdbError()); + const int ncol = tab->getNoOfColumns(); + + { + HugoTransactions trans(*tab); + CHK2(trans.loadTable(pNdb, records) == 0, trans.getNdbError()); + } + + for (int r = 0; r < records; r++) + { + // with 1000 records will surely hit bug case + const int lm = myRandom48(4); // 2 + const int nval = myRandom48(ncol + 1); // most + const bool exist = myRandom48(2); // false + + NdbTransaction* pTx = 0; + NdbOperation* pOp = 0; + CHK2((pTx = pNdb->startTransaction()) != 0, + pNdb->getNdbError()); + CHK2((pOp = pTx->getNdbOperation(tab)) != 0, + pTx->getNdbError()); + CHK2((pOp->readTuple((NdbOperation::LockMode)lm)) == 0, + pOp->getNdbError()); + + for (int id = 0; id <= 0; id++) + { + const NdbDictionary::Column* c = tab->getColumn(id); + assert(c != 0 && c->getPrimaryKey() && + c->getType() == NdbDictionary::Column::Unsigned); + Uint32 val = myRandom48(records); + if (!exist) + val = 0xaaaa0000 + myRandom48(0xffff + 1); + const char* valp = (const char*)&val; + CHK2(pOp->equal(id, valp) == 0, pOp->getNdbError()); + } + CHK2(result == NDBT_OK, "failed"); + + for (int id = 0; id < nval; id++) + { + const NdbDictionary::Column* c = tab->getColumn(id); + assert(c != 0 && (id == 0 || !c->getPrimaryKey())); + CHK2(pOp->getValue(id) != 0, pOp->getNdbError()); + } + CHK2(result == NDBT_OK, "failed"); + + char info1[200]; + sprintf(info1, "lm=%d nval=%d exist=%d", + lm, nval, exist); + g_info << "PK read T1 exec: " << info1 << endl; + NDB_TICKS t1 = NdbTick_CurrentMillisecond(); + int ret = pTx->execute(NdbTransaction::NoCommit); + NDB_TICKS t2 = NdbTick_CurrentMillisecond(); + int msec = (int)(t2-t1); + const NdbError& txerr = pTx->getNdbError(); + const NdbError& operr = pOp->getNdbError(); + char info2[200]; + sprintf(info2, "%s msec=%d ret=%d txerr=%d operr=%d", + info1, msec, ret, txerr.code, operr.code); + g_info << "PK read T1 done: " << info2 << endl; + + if (ret == 0 && txerr.code == 0 && operr.code == 0) + { + CHK2(exist, "row should not be found: " << info2); + } + else + if (ret == 0 && txerr.code == 626 && operr.code == 626) + { + CHK2(!exist, "row should be found: " << info2); + } + else + if (txerr.status == NdbError::TemporaryError) + { + g_err << "PK read T1 temporary error (tx): " << info2 << endl; + NdbSleep_MilliSleep(50); + } + else + if (operr.status == NdbError::TemporaryError) + { + g_err << "PK read T1 temporary error (op): " << info2 << endl; + NdbSleep_MilliSleep(50); + } + else + { + // gets 4012 before bugfix + CHK2(false, "unexpected error: " << info2); + } + pNdb->closeTransaction(pTx); + pTx = 0; + } + + break; + } + + g_err << "Clear half started hold..." << endl; + ctx->setProperty("HalfStartedHold", (Uint32)0); + return result; +} + int rollingRestart(NDBT_Context* ctx, NDBT_Step* step) { @@ -1165,12 +1323,31 @@ POSTUPGRADE("Upgrade_Mixed_MGMD_API_NDBD FINALIZER(runPostUpgradeChecks); FINALIZER(runClearAll); } +TESTCASE("Bug14702377", + "Dirty PK read of non-existent tuple 6.3->7.x hangs"){ + TC_PROPERTY("HalfStartedHold", (Uint32)1); + INITIALIZER(runCheckStarted); + INITIALIZER(runCreateOneTable); + STEP(runUpgrade_Half); + STEP(runBug14702377); +} +POSTUPGRADE("Bug14702377") +{ + INITIALIZER(runCheckStarted); + INITIALIZER(runPostUpgradeChecks); +} NDBT_TESTSUITE_END(testUpgrade); int main(int argc, const char** argv){ ndb_init(); testUpgrade.setCreateAllTables(true); + if (0) + { + static char env[100]; + strcpy(env, "API_SIGNAL_LOG=-"); // stdout + putenv(env); + } return testUpgrade.execute(argc, argv); } === modified file 'storage/ndb/test/run-test/upgrade-tests.txt' --- a/storage/ndb/test/run-test/upgrade-tests.txt 2010-02-18 23:01:15 +0000 +++ b/storage/ndb/test/run-test/upgrade-tests.txt 2012-12-03 08:20:58 +0000 @@ -23,6 +23,10 @@ args: -n Upgrade_Traffic_FS T1 max-time: 1200 cmd: testUpgrade +args: -n Bug14702377 T1 +max-time: 600 + +cmd: testUpgrade args: -n Upgrade_Api_Only T1 max-time: 1200 === modified file 'storage/ndb/test/src/HugoTransactions.cpp' --- a/storage/ndb/test/src/HugoTransactions.cpp 2012-05-03 09:52:53 +0000 +++ b/storage/ndb/test/src/HugoTransactions.cpp 2012-12-03 10:30:08 +0000 @@ -70,18 +70,21 @@ HugoTransactions::scanReadRecords(Ndb* p continue; } ERR(err); + setNdbError(err); return NDBT_FAILED; } pOp = getScanOperation(pTrans); if (pOp == NULL) { ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } if( pOp ->readTuples(lm, scan_flags, parallelism) ) { ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -90,6 +93,7 @@ HugoTransactions::scanReadRecords(Ndb* p if((row.attributeStore(a) = pOp->getValue(tab.getColumn(a)->getName())) == 0) { ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -106,6 +110,7 @@ HugoTransactions::scanReadRecords(Ndb* p continue; } ERR(err); + setNdbError(err); closeTransaction(pNdb); return NDBT_FAILED; } @@ -135,6 +140,7 @@ HugoTransactions::scanReadRecords(Ndb* p pOp->close(); if( check == -1 ) { ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -174,6 +180,7 @@ HugoTransactions::scanReadRecords(Ndb* p continue; } ERR(err); + setNdbError(err); closeTransaction(pNdb); return NDBT_FAILED; } @@ -229,18 +236,21 @@ HugoTransactions::scanReadRecords(Ndb* p continue; } ERR(err); + setNdbError(err); return NDBT_FAILED; } pOp = pTrans->getNdbIndexScanOperation(pIdx->getName(), tab.getName()); if (pOp == NULL) { ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } if( pOp ->readTuples(lm, scan_flags, parallelism) ) { ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -249,6 +259,7 @@ HugoTransactions::scanReadRecords(Ndb* p const HugoBound& b = bound_arr[i]; if (pOp->setBound(b.attr, b.type, b.value) != 0) { ERR(pOp->getNdbError()); + setNdbError(pOp->getNdbError()); return NDBT_FAILED; } } @@ -257,6 +268,7 @@ HugoTransactions::scanReadRecords(Ndb* p if((row.attributeStore(a) = pOp->getValue(tab.getColumn(a)->getName())) == 0) { ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -273,6 +285,7 @@ HugoTransactions::scanReadRecords(Ndb* p continue; } ERR(err); + setNdbError(err); closeTransaction(pNdb); return NDBT_FAILED; } @@ -302,6 +315,7 @@ HugoTransactions::scanReadRecords(Ndb* p pOp->close(); if( check == -1 ) { ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -354,6 +368,7 @@ HugoTransactions::scanReadRecords(Ndb* p continue; } ERR(err); + setNdbError(err); closeTransaction(pNdb); return NDBT_FAILED; } @@ -404,12 +419,14 @@ restart: NdbSleep_MilliSleep(50); continue; } + setNdbError(err); return NDBT_FAILED; } pOp = getScanOperation(pTrans); if (pOp == NULL) { ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -417,6 +434,8 @@ restart: if( pOp->readTuples(NdbOperation::LM_Exclusive, flags, parallelism)) { + ERR(pOp->getNdbError()); + setNdbError(pOp->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -425,6 +444,7 @@ restart: for(a=0; agetValue(tab.getColumn(a)->getName())) == NULL){ ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -439,6 +459,7 @@ restart: NdbSleep_MilliSleep(50); continue; } + setNdbError(err); return NDBT_FAILED; } @@ -459,6 +480,7 @@ restart: NdbOperation* pUp = pOp->updateCurrentTuple(); if(pUp == 0){ ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -469,6 +491,7 @@ restart: if (tab.getColumn(a)->getPrimaryKey() == false){ if(setValueForAttr(pUp, a, r, updates ) != 0){ ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -498,6 +521,7 @@ restart: NdbSleep_MilliSleep(50); goto restart; } + setNdbError(err); return NDBT_FAILED; } } @@ -510,6 +534,7 @@ restart: NdbSleep_MilliSleep(50); goto restart; } + setNdbError(err); return NDBT_FAILED; } @@ -641,6 +666,7 @@ HugoTransactions::loadTableStartFrom(Ndb continue; } ERR(err); + setNdbError(err); return NDBT_FAILED; } } @@ -648,6 +674,7 @@ HugoTransactions::loadTableStartFrom(Ndb if(pkInsertRecord(pNdb, c + startFrom, batch, value) != NDBT_OK) { ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -685,6 +712,7 @@ HugoTransactions::loadTableStartFrom(Ndb ERR(err); g_info << "ERROR: NdbError reports success when transcaction failed" << endl; + setNdbError(err); return NDBT_FAILED; break; @@ -698,6 +726,7 @@ HugoTransactions::loadTableStartFrom(Ndb case NdbError::UnknownResult: ERR(err); + setNdbError(err); return NDBT_FAILED; break; @@ -715,6 +744,7 @@ HugoTransactions::loadTableStartFrom(Ndb } } ERR(err); + setNdbError(err); return err.code; break; } @@ -784,12 +814,14 @@ HugoTransactions::fillTableStartFrom(Ndb continue; } ERR(err); + setNdbError(err); return NDBT_FAILED; } if(pkInsertRecord(pNdb, c, batch) != NDBT_OK) { ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -803,6 +835,7 @@ HugoTransactions::fillTableStartFrom(Ndb switch(err.status){ case NdbError::Success: ERR(err); + setNdbError(err); g_info << "ERROR: NdbError reports success when transcaction failed" << endl; return NDBT_FAILED; @@ -817,6 +850,7 @@ HugoTransactions::fillTableStartFrom(Ndb case NdbError::UnknownResult: ERR(err); + setNdbError(err); return NDBT_FAILED; break; @@ -845,6 +879,7 @@ HugoTransactions::fillTableStartFrom(Ndb break; } ERR(err); + setNdbError(err); return NDBT_FAILED; break; } @@ -898,6 +933,7 @@ HugoTransactions::pkReadRecords(Ndb* pNd continue; } ERR(err); + setNdbError(err); return NDBT_FAILED; } @@ -917,6 +953,7 @@ HugoTransactions::pkReadRecords(Ndb* pNd if(pkReadRecord(pNdb, r, batch, lm, &lmused) != NDBT_OK) { ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -926,6 +963,7 @@ HugoTransactions::pkReadRecords(Ndb* pNd if(pkReadRandRecord(pNdb, records, batch, lm, &lmused) != NDBT_OK) { ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -964,6 +1002,7 @@ HugoTransactions::pkReadRecords(Ndb* pNd default: ERR(err); + setNdbError(err); closeTransaction(pNdb); return NDBT_FAILED; } @@ -1074,12 +1113,14 @@ HugoTransactions::pkUpdateRecords(Ndb* p continue; } ERR(err); + setNdbError(err); return NDBT_FAILED; } if(pkReadRecord(pNdb, r, batch, NdbOperation::LM_Exclusive) != NDBT_OK) { ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -1096,6 +1137,7 @@ HugoTransactions::pkUpdateRecords(Ndb* p continue; } ERR(err); + setNdbError(err); closeTransaction(pNdb); return NDBT_FAILED; } @@ -1137,6 +1179,7 @@ HugoTransactions::pkUpdateRecords(Ndb* p if(pkUpdateRecord(pNdb, rowId, 1, updates) != NDBT_OK) { ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -1180,6 +1223,7 @@ HugoTransactions::pkUpdateRecords(Ndb* p if(pkUpdateRecord(pNdb, r+b, 1, updates) != NDBT_OK) { ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -1197,6 +1241,7 @@ HugoTransactions::pkUpdateRecords(Ndb* p continue; } ERR(err); + setNdbError(err); ndbout << "r = " << r << endl; closeTransaction(pNdb); return NDBT_FAILED; @@ -1252,12 +1297,14 @@ HugoTransactions::pkInterpretedUpdateRec continue; } ERR(err); + setNdbError(err); return NDBT_FAILED; } NdbOperation* pOp = pTrans->getNdbOperation(tab.getName()); if (pOp == NULL) { ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -1265,6 +1312,7 @@ HugoTransactions::pkInterpretedUpdateRec check = pOp->readTupleExclusive(); if( check == -1 ) { ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -1282,6 +1330,7 @@ HugoTransactions::pkInterpretedUpdateRec if((row.attributeStore(a) = pOp->getValue(tab.getColumn(a)->getName())) == 0) { ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -1300,6 +1349,7 @@ HugoTransactions::pkInterpretedUpdateRec continue; } ERR(err); + setNdbError(err); closeTransaction(pNdb); return NDBT_FAILED; } @@ -1310,6 +1360,7 @@ HugoTransactions::pkInterpretedUpdateRec pUpdOp = pTrans->getNdbOperation(tab.getName()); if (pUpdOp == NULL) { ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -1317,6 +1368,7 @@ HugoTransactions::pkInterpretedUpdateRec check = pUpdOp->interpretedUpdateTuple(); if( check == -1 ) { ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -1339,6 +1391,7 @@ HugoTransactions::pkInterpretedUpdateRec check = pUpdOp->incValue(attr->getName(), valToIncWith); if( check == -1 ) { ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -1351,6 +1404,7 @@ HugoTransactions::pkInterpretedUpdateRec (calc.isUpdateCol(a) == false)){ if(setValueForAttr(pUpdOp, a, r, updates ) != 0){ ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -1371,6 +1425,7 @@ HugoTransactions::pkInterpretedUpdateRec continue; } ERR(err); + setNdbError(err); ndbout << "r = " << r << endl; closeTransaction(pNdb); return NDBT_FAILED; @@ -1436,6 +1491,7 @@ HugoTransactions::pkDelRecords(Ndb* pNdb continue; } ERR(err); + setNdbError(err); return NDBT_FAILED; } @@ -1452,6 +1508,7 @@ HugoTransactions::pkDelRecords(Ndb* pNdb if(pkDeleteRecord(pNdb, r, batch) != NDBT_OK) { ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -1482,12 +1539,14 @@ HugoTransactions::pkDelRecords(Ndb* pNdb } } ERR(err); + setNdbError(err); closeTransaction(pNdb); return NDBT_FAILED; break; default: ERR(err); + setNdbError(err); closeTransaction(pNdb); return NDBT_FAILED; } @@ -1559,12 +1618,14 @@ HugoTransactions::lockRecords(Ndb* pNdb, continue; } ERR(err); + setNdbError(err); return NDBT_FAILED; } if(pkReadRecord(pNdb, r, lockBatch, lm) != NDBT_OK) { ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -1586,6 +1647,7 @@ HugoTransactions::lockRecords(Ndb* pNdb, continue; } ERR(err); + setNdbError(err); closeTransaction(pNdb); return NDBT_FAILED; } @@ -1612,6 +1674,7 @@ HugoTransactions::lockRecords(Ndb* pNdb, continue; } ERR(err); + setNdbError(err); closeTransaction(pNdb); return NDBT_FAILED; } @@ -1680,6 +1743,7 @@ HugoTransactions::indexReadRecords(Ndb* continue; } ERR(err); + setNdbError(err); return NDBT_FAILED; } @@ -1688,6 +1752,7 @@ HugoTransactions::indexReadRecords(Ndb* pOp = pTrans->getNdbIndexOperation(idxName, tab.getName()); if (pOp == NULL) { ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -1696,6 +1761,7 @@ HugoTransactions::indexReadRecords(Ndb* pOp = sOp = pTrans->getNdbIndexScanOperation(idxName, tab.getName()); if (sOp == NULL) { ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -1704,6 +1770,7 @@ HugoTransactions::indexReadRecords(Ndb* if( check == -1 ) { ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -1720,6 +1787,7 @@ HugoTransactions::indexReadRecords(Ndb* if((rows[b]->attributeStore(a) = pOp->getValue(tab.getColumn(a)->getName())) == 0) { ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -1746,6 +1814,7 @@ HugoTransactions::indexReadRecords(Ndb* default: ERR(err); + setNdbError(err); closeTransaction(pNdb); return NDBT_FAILED; } @@ -1815,6 +1884,7 @@ HugoTransactions::indexUpdateRecords(Ndb continue; } ERR(err); + setNdbError(err); return NDBT_FAILED; } @@ -1823,6 +1893,7 @@ HugoTransactions::indexUpdateRecords(Ndb pOp = pTrans->getNdbIndexOperation(idxName, tab.getName()); if (pOp == NULL) { ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -1830,6 +1901,7 @@ HugoTransactions::indexUpdateRecords(Ndb check = pOp->readTupleExclusive(); if( check == -1 ) { ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -1837,6 +1909,7 @@ HugoTransactions::indexUpdateRecords(Ndb pOp = sOp = pTrans->getNdbIndexScanOperation(idxName, tab.getName()); if (pOp == NULL) { ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -1857,6 +1930,7 @@ HugoTransactions::indexUpdateRecords(Ndb if((rows[b]->attributeStore(a) = pOp->getValue(tab.getColumn(a)->getName())) == 0) { ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -1875,6 +1949,7 @@ HugoTransactions::indexUpdateRecords(Ndb retryAttempt++; continue; } + setNdbError(err); return NDBT_FAILED; } @@ -1902,12 +1977,14 @@ HugoTransactions::indexUpdateRecords(Ndb if (pUpdOp == NULL) { ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } if( check == -1 ) { ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -1925,6 +2002,7 @@ HugoTransactions::indexUpdateRecords(Ndb if (tab.getColumn(a)->getPrimaryKey() == false){ if(setValueForAttr(pUpdOp, a, r+b, updates ) != 0){ ERR(pTrans->getNdbError()); + setNdbError(pTrans->getNdbError()); closeTransaction(pNdb); return NDBT_FAILED; } @@ -1944,6 +2022,7 @@ HugoTransactions::indexUpdateRecords(Ndb continue; } ndbout << "r = " << r << endl; + setNdbError(err); return NDBT_FAILED; } else { updated += batch; No bundle (reason: useless for push emails).