4110 Jonas Oreland 2011-01-14 [merge]
ndb - merge 63 to 70
modified:
storage/ndb/src/kernel/blocks/ERROR_codes.txt
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
storage/ndb/test/ndbapi/testBasic.cpp
storage/ndb/test/run-test/daily-basic-tests.txt
4109 Jonas Oreland 2011-01-14
ndb - make ndb_blob_big stable...by removing checks for warnings :-(
modified:
mysql-test/suite/ndb/r/ndb_blob_big.result
mysql-test/suite/ndb/t/ndb_blob_big.test
=== modified file 'storage/ndb/src/kernel/blocks/ERROR_codes.txt'
--- a/storage/ndb/src/kernel/blocks/ERROR_codes.txt 2010-12-04 11:20:36 +0000
+++ b/storage/ndb/src/kernel/blocks/ERROR_codes.txt 2011-01-14 12:05:51 +0000
@@ -6,7 +6,7 @@ Next DBTUP 4035
Next DBLQH 5064
Next DBDICT 6026
Next DBDIH 7229
-Next DBTC 8088
+Next DBTC 8090
Next CMVMI 9000
Next BACKUP 10042
Next DBUTIL 11002
=== modified file 'storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp 2010-12-05 10:36:30 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp 2011-01-14 12:05:51 +0000
@@ -5063,7 +5063,11 @@ void Dbtc::commit020Lab(Signal* signal)
Tcount += sendCommitLqh(signal, localTcConnectptr.p);
if (localTcConnectptr.i != RNIL) {
- if (Tcount < 16 && !ERROR_INSERTED(8057) && !ERROR_INSERTED(8073)) {
+ if (Tcount < 16 &&
+ ! (ERROR_INSERTED(8057) ||
+ ERROR_INSERTED(8073) ||
+ ERROR_INSERTED(8089)))
+ {
ptrCheckGuard(localTcConnectptr,
TtcConnectFilesize, localTcConnectRecord);
jam();
@@ -5085,6 +5089,11 @@ void Dbtc::commit020Lab(Signal* signal)
signal->theData[0] = TcContinueB::ZSEND_COMMIT_LOOP;
signal->theData[1] = apiConnectptr.i;
signal->theData[2] = localTcConnectptr.i;
+ if (ERROR_INSERTED(8089))
+ {
+ sendSignalWithDelay(cownref, GSN_CONTINUEB, signal, 100, 3);
+ return;
+ }
sendSignal(cownref, GSN_CONTINUEB, signal, 3, JBB);
return;
}//if
@@ -5093,6 +5102,9 @@ void Dbtc::commit020Lab(Signal* signal)
if (ERROR_INSERTED(8057))
CLEAR_ERROR_INSERT_VALUE;
+ if (ERROR_INSERTED(8089))
+ CLEAR_ERROR_INSERT_VALUE;
+
regApiPtr->apiConnectstate = CS_COMMIT_SENT;
return;
}//if
@@ -6798,9 +6810,13 @@ ABORT020:
if (tcConnectptr.p->nextTcConnect != RNIL) {
jam();
tcConnectptr.i = tcConnectptr.p->nextTcConnect;
- if (TloopCount < 1024) {
+ if (TloopCount < 1024 && !
+ (ERROR_INSERTED(8089)))
+ {
goto ABORT020;
- } else {
+ }
+ else
+ {
jam();
/*---------------------------------------------------------------------
* Reset timer to avoid time-out in real-time break.
@@ -6812,10 +6828,21 @@ ABORT020:
signal->theData[0] = TcContinueB::ZABORT_BREAK;
signal->theData[1] = tcConnectptr.i;
signal->theData[2] = apiConnectptr.i;
+ if (ERROR_INSERTED(8089))
+ {
+ sendSignalWithDelay(cownref, GSN_CONTINUEB, signal, 100, 3);
+ return;
+ }
sendSignal(cownref, GSN_CONTINUEB, signal, 3, JBB);
return;
}//if
}//if
+
+ if (ERROR_INSERTED(8089))
+ {
+ CLEAR_ERROR_INSERT_VALUE;
+ }
+
if (apiConnectptr.p->counter > 0) {
jam();
setApiConTimer(apiConnectptr.i, ctcTimer, __LINE__);
=== modified file 'storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp 2010-12-31 14:18:32 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp 2011-01-14 12:05:51 +0000
@@ -286,8 +286,9 @@ Dbtup::setup_read(KeyReqStruct *req_stru
Uint32 currOp= currOpPtr.p->op_struct.op_type;
+ bool is_insert = (bits & Tuple_header::ALLOC);
if((found && currOp == ZDELETE) ||
- ((dirty || !found) && currOp == ZINSERT))
+ ((dirty || !found) && is_insert))
{
terrorCode= ZTUPLE_DELETED_ERROR;
break;
=== modified file 'storage/ndb/test/ndbapi/testBasic.cpp'
--- a/storage/ndb/test/ndbapi/testBasic.cpp 2010-11-28 11:34:01 +0000
+++ b/storage/ndb/test/ndbapi/testBasic.cpp 2011-01-14 12:05:51 +0000
@@ -2188,6 +2188,86 @@ runBug54944(NDBT_Context* ctx, NDBT_Step
return NDBT_OK;
}
+int
+runBug59496_scan(NDBT_Context* ctx, NDBT_Step* step)
+{
+ Ndb* pNdb = GETNDB(step);
+ const NdbDictionary::Table * pTab = ctx->getTab();
+ NdbRestarter res;
+ int rowcount = ctx->getProperty("CHECK_ROWCOUNT", Uint32(0));
+ int records = ctx->getNumRecords();
+ if (rowcount == 0)
+ records = 0;
+
+ HugoTransactions hugoTrans(*pTab);
+ while (!ctx->isTestStopped())
+ {
+ if (hugoTrans.scanReadRecords(pNdb,
+ records, 0, 0,
+ NdbOperation::LM_CommittedRead,
+ (int)NdbScanOperation::SF_TupScan) != NDBT_OK)
+ return NDBT_FAILED;
+ }
+ return NDBT_OK;
+}
+
+int
+runBug59496_case1(NDBT_Context* ctx, NDBT_Step* step)
+{
+ Ndb* pNdb = GETNDB(step);
+ NdbRestarter res;
+
+ int loops = ctx->getNumLoops();
+ int records = ctx->getNumRecords();
+
+ HugoOperations hugoOps(*ctx->getTab());
+ for (int i = 0; i < loops; i++)
+ {
+ hugoOps.startTransaction(pNdb);
+ hugoOps.pkInsertRecord(pNdb, 0, records, 0);
+ hugoOps.execute_NoCommit(pNdb);
+ hugoOps.pkUpdateRecord(pNdb, 0, records, rand());
+ hugoOps.execute_NoCommit(pNdb);
+ hugoOps.pkUpdateRecord(pNdb, 0, records, rand());
+ hugoOps.execute_NoCommit(pNdb);
+ res.insertErrorInAllNodes(8089);
+ hugoOps.execute_Commit(pNdb);
+ res.insertErrorInAllNodes(0);
+ hugoOps.closeTransaction(pNdb);
+ hugoOps.clearTable(pNdb);
+ }
+ ctx->stopTest();
+ return NDBT_OK;
+}
+
+int
+runBug59496_case2(NDBT_Context* ctx, NDBT_Step* step)
+{
+ Ndb* pNdb = GETNDB(step);
+ NdbRestarter res;
+
+ int loops = ctx->getNumLoops();
+ int records = ctx->getNumRecords();
+
+ HugoOperations hugoOps(*ctx->getTab());
+ for (int i = 0; i < loops; i++)
+ {
+ hugoOps.startTransaction(pNdb);
+ hugoOps.pkDeleteRecord(pNdb, 0, records);
+ hugoOps.execute_NoCommit(pNdb);
+ hugoOps.pkInsertRecord(pNdb, 0, records, 0);
+ hugoOps.execute_NoCommit(pNdb);
+
+ res.insertErrorInAllNodes(8089);
+ hugoOps.execute_Rollback(pNdb);
+ res.insertErrorInAllNodes(0);
+
+ hugoOps.closeTransaction(pNdb);
+ }
+ ctx->stopTest();
+ return NDBT_OK;
+}
+
NDBT_TESTSUITE(testBasic);
TESTCASE("PkInsert",
"Verify that we can insert and delete from this table using PK"
@@ -2527,6 +2607,18 @@ TESTCASE("Bug54944", "")
{
INITIALIZER(runBug54944);
}
+TESTCASE("Bug59496_case1", "")
+{
+ STEP(runBug59496_case1);
+ STEPS(runBug59496_scan, 10);
+}
+TESTCASE("Bug59496_case2", "")
+{
+ TC_PROPERTY("CHECK_ROWCOUNT", 1);
+ INITIALIZER(runLoadTable);
+ STEP(runBug59496_case2);
+ STEPS(runBug59496_scan, 10);
+}
NDBT_TESTSUITE_END(testBasic);
#if 0
=== modified file 'storage/ndb/test/run-test/daily-basic-tests.txt'
--- a/storage/ndb/test/run-test/daily-basic-tests.txt 2011-01-03 15:08:41 +0000
+++ b/storage/ndb/test/run-test/daily-basic-tests.txt 2011-01-14 12:05:51 +0000
@@ -259,6 +259,14 @@ max-time: 500
cmd: testBasic
args: -n Bug54944 T1
+max-time: 600
+cmd: testBasic
+args: -r 10 -n Bug59496_case1 T2
+
+max-time: 600
+cmd: testBasic
+args: -r 10 -n Bug59496_case2 T2
+
#
# INDEX
#
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-5.1-telco-7.0 branch (jonas:4109 to 4110) | Jonas Oreland | 14 Jan |