4133 Pekka Nousiainen 2012-12-03 [merge]
merge 7.1->7.2
modified:
storage/ndb/test/ndbapi/testUpgrade.cpp
storage/ndb/test/run-test/upgrade-tests.txt
storage/ndb/test/src/HugoTransactions.cpp
4132 Ole John Aske 2012-12-03 [merge]
merge 7.1 -> 7.2
=== modified file 'storage/ndb/test/ndbapi/testUpgrade.cpp'
--- a/storage/ndb/test/ndbapi/testUpgrade.cpp 2012-06-25 12:55:27 +0000
+++ b/storage/ndb/test/ndbapi/testUpgrade.cpp 2012-12-03 14:23:00 +0000
@@ -24,6 +24,7 @@
#include <Bitmask.hpp>
#include <NdbBackup.hpp>
#include <ndb_version.h>
+#include <random.h>
static Vector<BaseString> table_list;
@@ -439,6 +440,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; (i<nodes.size() && restartCount); i++)
@@ -764,7 +778,24 @@ runBasic(NDBT_Context* ctx, NDBT_Step* s
}
}
g_info << "range scan T1 with " << bound_cnt << " bounds" << endl;
- trans.scanReadRecords(pNdb, pInd, records, 0, 0, NdbOperation::LM_Read, 0, bound_cnt, bound_arr);
+ if (trans.scanReadRecords(pNdb, pInd, records, 0, 0,
+ NdbOperation::LM_Read, 0, bound_cnt, bound_arr) != 0)
+ {
+ const NdbError& err = trans.getNdbError();
+ /*
+ * bug#13834481 symptoms include timeouts and error 1231.
+ * Check for any non-temporary error.
+ */
+ if (err.status == NdbError::TemporaryError)
+ {
+ g_info << "range scan T1 temporary error: " << err << endl;
+ }
+ if (err.status != NdbError::TemporaryError)
+ {
+ g_err << "range scan T1 permanent error: " << err << endl;
+ return NDBT_FAILED;
+ }
+ }
}
trans.clearTable(pNdb, records/2);
trans.loadTable(pNdb, records/2);
@@ -788,6 +819,133 @@ runBasic(NDBT_Context* ctx, NDBT_Step* s
return result;
}
+#define CHK2(b, e) \
+ if (!(b)) { \
+ g_err << "ERR: " << #b << " failed at line " << __LINE__ \
+ << ": " << e << endl; \
+ result = NDBT_FAILED; \
+ break; \
+ }
+
+static int
+runBug14702377(NDBT_Context* ctx, NDBT_Step* step)
+{
+ Ndb* pNdb = GETNDB(step);
+ NdbDictionary::Dictionary * pDict = pNdb->getDictionary();
+ 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)
{
@@ -1254,6 +1412,19 @@ 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);
@@ -1261,6 +1432,12 @@ int main(int argc, const char** argv){
ndb_init();
NDBT_TESTSUITE_INSTANCE(testUpgrade);
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-07 07:51:09 +0000
+++ b/storage/ndb/test/src/HugoTransactions.cpp 2012-12-03 14:39:34 +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,6 +419,7 @@ restart:
NdbSleep_MilliSleep(50);
continue;
}
+ setNdbError(err);
return NDBT_FAILED;
}
@@ -418,12 +434,15 @@ restart:
NdbSleep_MilliSleep(50);
continue;
}
+ setNdbError(err);
return NDBT_FAILED;
}
if( pOp->readTuples(NdbOperation::LM_Exclusive, flags,
parallelism))
{
+ ERR(pOp->getNdbError());
+ setNdbError(pOp->getNdbError());
closeTransaction(pNdb);
return NDBT_FAILED;
}
@@ -432,6 +451,7 @@ restart:
for(a=0; a<tab.getNoOfColumns(); a++){
if((row.attributeStore(a) = pOp->getValue(tab.getColumn(a)->getName())) == NULL){
ERR(pTrans->getNdbError());
+ setNdbError(pTrans->getNdbError());
closeTransaction(pNdb);
return NDBT_FAILED;
}
@@ -446,6 +466,7 @@ restart:
NdbSleep_MilliSleep(50);
continue;
}
+ setNdbError(err);
return NDBT_FAILED;
}
@@ -466,6 +487,7 @@ restart:
NdbOperation* pUp = pOp->updateCurrentTuple();
if(pUp == 0){
ERR(pTrans->getNdbError());
+ setNdbError(pTrans->getNdbError());
closeTransaction(pNdb);
return NDBT_FAILED;
}
@@ -476,6 +498,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;
}
@@ -505,6 +528,7 @@ restart:
NdbSleep_MilliSleep(50);
goto restart;
}
+ setNdbError(err);
return NDBT_FAILED;
}
}
@@ -517,6 +541,7 @@ restart:
NdbSleep_MilliSleep(50);
goto restart;
}
+ setNdbError(err);
return NDBT_FAILED;
}
@@ -648,6 +673,7 @@ HugoTransactions::loadTableStartFrom(Ndb
continue;
}
ERR(err);
+ setNdbError(err);
return NDBT_FAILED;
}
}
@@ -655,6 +681,7 @@ HugoTransactions::loadTableStartFrom(Ndb
if(pkInsertRecord(pNdb, c + startFrom, batch, value) != NDBT_OK)
{
ERR(pTrans->getNdbError());
+ setNdbError(pTrans->getNdbError());
closeTransaction(pNdb);
return NDBT_FAILED;
}
@@ -692,6 +719,7 @@ HugoTransactions::loadTableStartFrom(Ndb
ERR(err);
g_info << "ERROR: NdbError reports success when transcaction failed"
<< endl;
+ setNdbError(err);
return NDBT_FAILED;
break;
@@ -705,6 +733,7 @@ HugoTransactions::loadTableStartFrom(Ndb
case NdbError::UnknownResult:
ERR(err);
+ setNdbError(err);
return NDBT_FAILED;
break;
@@ -722,6 +751,7 @@ HugoTransactions::loadTableStartFrom(Ndb
}
}
ERR(err);
+ setNdbError(err);
return err.code;
break;
}
@@ -791,12 +821,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;
}
@@ -810,6 +842,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;
@@ -824,6 +857,7 @@ HugoTransactions::fillTableStartFrom(Ndb
case NdbError::UnknownResult:
ERR(err);
+ setNdbError(err);
return NDBT_FAILED;
break;
@@ -852,6 +886,7 @@ HugoTransactions::fillTableStartFrom(Ndb
break;
}
ERR(err);
+ setNdbError(err);
return NDBT_FAILED;
break;
}
@@ -905,6 +940,7 @@ HugoTransactions::pkReadRecords(Ndb* pNd
continue;
}
ERR(err);
+ setNdbError(err);
return NDBT_FAILED;
}
@@ -924,6 +960,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;
}
@@ -933,6 +970,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;
}
@@ -971,6 +1009,7 @@ HugoTransactions::pkReadRecords(Ndb* pNd
default:
ERR(err);
+ setNdbError(err);
closeTransaction(pNdb);
return NDBT_FAILED;
}
@@ -1081,12 +1120,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;
}
@@ -1103,6 +1144,7 @@ HugoTransactions::pkUpdateRecords(Ndb* p
continue;
}
ERR(err);
+ setNdbError(err);
closeTransaction(pNdb);
return NDBT_FAILED;
}
@@ -1144,6 +1186,7 @@ HugoTransactions::pkUpdateRecords(Ndb* p
if(pkUpdateRecord(pNdb, rowId, 1, updates) != NDBT_OK)
{
ERR(pTrans->getNdbError());
+ setNdbError(pTrans->getNdbError());
closeTransaction(pNdb);
return NDBT_FAILED;
}
@@ -1187,6 +1230,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;
}
@@ -1204,6 +1248,7 @@ HugoTransactions::pkUpdateRecords(Ndb* p
continue;
}
ERR(err);
+ setNdbError(err);
ndbout << "r = " << r << endl;
closeTransaction(pNdb);
return NDBT_FAILED;
@@ -1259,12 +1304,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;
}
@@ -1272,6 +1319,7 @@ HugoTransactions::pkInterpretedUpdateRec
check = pOp->readTupleExclusive();
if( check == -1 ) {
ERR(pTrans->getNdbError());
+ setNdbError(pTrans->getNdbError());
closeTransaction(pNdb);
return NDBT_FAILED;
}
@@ -1289,6 +1337,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;
}
@@ -1307,6 +1356,7 @@ HugoTransactions::pkInterpretedUpdateRec
continue;
}
ERR(err);
+ setNdbError(err);
closeTransaction(pNdb);
return NDBT_FAILED;
}
@@ -1317,6 +1367,7 @@ HugoTransactions::pkInterpretedUpdateRec
pUpdOp = pTrans->getNdbOperation(tab.getName());
if (pUpdOp == NULL) {
ERR(pTrans->getNdbError());
+ setNdbError(pTrans->getNdbError());
closeTransaction(pNdb);
return NDBT_FAILED;
}
@@ -1324,6 +1375,7 @@ HugoTransactions::pkInterpretedUpdateRec
check = pUpdOp->interpretedUpdateTuple();
if( check == -1 ) {
ERR(pTrans->getNdbError());
+ setNdbError(pTrans->getNdbError());
closeTransaction(pNdb);
return NDBT_FAILED;
}
@@ -1346,6 +1398,7 @@ HugoTransactions::pkInterpretedUpdateRec
check = pUpdOp->incValue(attr->getName(), valToIncWith);
if( check == -1 ) {
ERR(pTrans->getNdbError());
+ setNdbError(pTrans->getNdbError());
closeTransaction(pNdb);
return NDBT_FAILED;
}
@@ -1358,6 +1411,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;
}
@@ -1378,6 +1432,7 @@ HugoTransactions::pkInterpretedUpdateRec
continue;
}
ERR(err);
+ setNdbError(err);
ndbout << "r = " << r << endl;
closeTransaction(pNdb);
return NDBT_FAILED;
@@ -1443,6 +1498,7 @@ HugoTransactions::pkDelRecords(Ndb* pNdb
continue;
}
ERR(err);
+ setNdbError(err);
return NDBT_FAILED;
}
@@ -1459,6 +1515,7 @@ HugoTransactions::pkDelRecords(Ndb* pNdb
if(pkDeleteRecord(pNdb, r, batch) != NDBT_OK)
{
ERR(pTrans->getNdbError());
+ setNdbError(pTrans->getNdbError());
closeTransaction(pNdb);
return NDBT_FAILED;
}
@@ -1489,12 +1546,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;
}
@@ -1777,12 +1836,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;
}
@@ -1806,6 +1867,7 @@ HugoTransactions::lockRecords(Ndb* pNdb,
break;
}
ERR(err);
+ setNdbError(err);
closeTransaction(pNdb);
return NDBT_FAILED;
}
@@ -1835,6 +1897,7 @@ HugoTransactions::lockRecords(Ndb* pNdb,
continue;
}
ERR(err);
+ setNdbError(err);
closeTransaction(pNdb);
return NDBT_FAILED;
}
@@ -1903,6 +1966,7 @@ HugoTransactions::indexReadRecords(Ndb*
continue;
}
ERR(err);
+ setNdbError(err);
return NDBT_FAILED;
}
@@ -1911,6 +1975,7 @@ HugoTransactions::indexReadRecords(Ndb*
pOp = pTrans->getNdbIndexOperation(idxName, tab.getName());
if (pOp == NULL) {
ERR(pTrans->getNdbError());
+ setNdbError(pTrans->getNdbError());
closeTransaction(pNdb);
return NDBT_FAILED;
}
@@ -1919,6 +1984,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;
}
@@ -1927,6 +1993,7 @@ HugoTransactions::indexReadRecords(Ndb*
if( check == -1 ) {
ERR(pTrans->getNdbError());
+ setNdbError(pTrans->getNdbError());
closeTransaction(pNdb);
return NDBT_FAILED;
}
@@ -1943,6 +2010,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;
}
@@ -1969,6 +2037,7 @@ HugoTransactions::indexReadRecords(Ndb*
default:
ERR(err);
+ setNdbError(err);
closeTransaction(pNdb);
return NDBT_FAILED;
}
@@ -2038,6 +2107,7 @@ HugoTransactions::indexUpdateRecords(Ndb
continue;
}
ERR(err);
+ setNdbError(err);
return NDBT_FAILED;
}
@@ -2046,6 +2116,7 @@ HugoTransactions::indexUpdateRecords(Ndb
pOp = pTrans->getNdbIndexOperation(idxName, tab.getName());
if (pOp == NULL) {
ERR(pTrans->getNdbError());
+ setNdbError(pTrans->getNdbError());
closeTransaction(pNdb);
return NDBT_FAILED;
}
@@ -2053,6 +2124,7 @@ HugoTransactions::indexUpdateRecords(Ndb
check = pOp->readTupleExclusive();
if( check == -1 ) {
ERR(pTrans->getNdbError());
+ setNdbError(pTrans->getNdbError());
closeTransaction(pNdb);
return NDBT_FAILED;
}
@@ -2060,6 +2132,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;
}
@@ -2080,6 +2153,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;
}
@@ -2098,6 +2172,7 @@ HugoTransactions::indexUpdateRecords(Ndb
retryAttempt++;
continue;
}
+ setNdbError(err);
return NDBT_FAILED;
}
@@ -2125,12 +2200,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;
}
@@ -2148,6 +2225,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;
}
@@ -2167,6 +2245,7 @@ HugoTransactions::indexUpdateRecords(Ndb
continue;
}
ndbout << "r = " << r << endl;
+ setNdbError(err);
return NDBT_FAILED;
} else {
updated += batch;
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-5.5-cluster-7.2 branch (pekka.nousiainen:4132 to 4133) | Pekka Nousiainen | 4 Dec |