From: Pekka Nousiainen Date: October 24 2012 1:19pm Subject: bzr push into mysql-5.5-cluster-7.2 branch (pekka.nousiainen:4050 to 4051) List-Archive: http://lists.mysql.com/commits/145109 Message-Id: <20121024131940.7970.54829.4051@cuda> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 4051 Pekka Nousiainen 2012-10-24 [merge] merge to 7.2 modified: storage/ndb/src/kernel/blocks/ERROR_codes.txt storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp storage/ndb/src/ndbapi/ndberror.c storage/ndb/test/ndbapi/testBasic.cpp storage/ndb/test/run-test/daily-basic-tests.txt 4050 Craig L Russell 2012-10-23 Remove dependency on junit for clusterj-test and clusterj-jpatest remove test for existence of junit on WITH-CLASSPATH include files from clusterj-unit in clusterj-test and clusterj-jpatest always build clusterj-test and clusterj-jpatest if building clusterj modified: storage/ndb/clusterj/CMakeLists.txt storage/ndb/clusterj/clusterj-jpatest/CMakeLists.txt storage/ndb/clusterj/clusterj-test/CMakeLists.txt === modified file 'storage/ndb/src/kernel/blocks/ERROR_codes.txt' --- a/storage/ndb/src/kernel/blocks/ERROR_codes.txt 2012-02-23 15:41:31 +0000 +++ b/storage/ndb/src/kernel/blocks/ERROR_codes.txt 2012-10-24 11:26:37 +0000 @@ -21,7 +21,7 @@ Next DBTUP 4035 Next DBLQH 5075 Next DBDICT 6026 Next DBDIH 7232 -Next DBTC 8092 +Next DBTC 8097 Next CMVMI 9000 Next BACKUP 10042 Next DBUTIL 11002 @@ -393,6 +393,9 @@ DBTC LONG SIGNAL TESTING 8085: Simulate execFIRE_TRIG_ORD DataBuffer exhaustion 8086: Simulate execFIRE_TRIG_ORD segmented section exhaustion +8087: Simulate commit ack marker exhaustion +8096: Simulate commit ack marker databuffer exhaustion + DBLQH LONG SIGNAL TESTING ------------------------- 5051: Send short LQHKEYREQ to next replica === modified file 'storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp' --- a/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp 2012-10-17 14:43:50 +0000 +++ b/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp 2012-10-24 11:26:37 +0000 @@ -111,6 +111,7 @@ #define ZCOMMIT_TYPE_ERROR 278 #define ZNO_FREE_TC_MARKER 279 +#define ZNO_FREE_TC_MARKER_DATABUFFER 273 #define ZNODE_SHUTDOWN_IN_PROGRESS 280 #define ZCLUSTER_SHUTDOWN_IN_PROGRESS 281 #define ZWRONG_STATE 282 === modified file 'storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp' --- a/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp 2012-10-17 14:43:50 +0000 +++ b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp 2012-10-24 11:26:37 +0000 @@ -1855,6 +1855,13 @@ start_failure: abortErrorLab(signal); return; } + case 67: + { + jam(); + terrorCode = ZNO_FREE_TC_MARKER_DATABUFFER; + abortErrorLab(signal); + return; + } default: jam(); systemErrorLab(signal, __LINE__); @@ -4251,6 +4258,21 @@ Dbtc::CommitAckMarker::insert_in_commit_ Uint32 item = instanceKey + (node_id << 16); CommitAckMarkerBuffer::DataBufferPool & pool = tc->c_theCommitAckMarkerBufferPool; + // check for duplicate (todo DataBuffer method find-or-append) + { + LocalDataBuffer<5> tmp(pool, this->theDataBuffer); + CommitAckMarkerBuffer::Iterator iter; + bool next_flag = tmp.first(iter); + while (next_flag) + { + Uint32 dataWord = *iter.data; + if (dataWord == item) + { + return true; + } + next_flag = tmp.next(iter, 1); + } + } LocalDataBuffer<5> tmp(pool, this->theDataBuffer); return tmp.append(&item, (Uint32)1); } @@ -4412,12 +4434,18 @@ void Dbtc::execLQHKEYCONF(Signal* signal for(Uint32 i = 0; i < noOfLqhs; i++) { jam(); + if (ERROR_INSERTED(8096) && i+1 == noOfLqhs) + { + CLEAR_ERROR_INSERT_VALUE; + TCKEY_abort(signal, 67); + return; + } if (!tmp->insert_in_commit_ack_marker(this, regTcPtr->lqhInstanceKey, regTcPtr->tcNodedata[i])) { - ndbout_c("Failed insert_in_commit_ack_marker"); - ; //RONM TODO error handling + TCKEY_abort(signal, 67); + return; } } } === modified file 'storage/ndb/src/ndbapi/ndberror.c' --- a/storage/ndb/src/ndbapi/ndberror.c 2012-09-19 07:09:57 +0000 +++ b/storage/ndb/src/ndbapi/ndberror.c 2012-10-24 11:26:37 +0000 @@ -204,6 +204,7 @@ ErrorBundle ErrorCodes[] = { "Out of operation records in transaction coordinator (increase MaxNoOfConcurrentOperations)" }, { 275, DMEC, TR, "Out of transaction records for complete phase (increase MaxNoOfConcurrentTransactions)" }, { 279, DMEC, TR, "Out of transaction markers in transaction coordinator" }, + { 273, DMEC, TR, "Out of transaction markers databuffer in transaction coordinator" }, { 312, DMEC, TR, "Out of LongMessageBuffer" }, { 414, DMEC, TR, "414" }, { 418, DMEC, TR, "Out of transaction buffers in LQH" }, === modified file 'storage/ndb/test/ndbapi/testBasic.cpp' --- a/storage/ndb/test/ndbapi/testBasic.cpp 2012-06-25 12:55:27 +0000 +++ b/storage/ndb/test/ndbapi/testBasic.cpp 2012-10-24 10:05:26 +0000 @@ -2159,6 +2159,7 @@ runBug54944(NDBT_Context* ctx, NDBT_Step Ndb* pNdb = GETNDB(step); const NdbDictionary::Table * pTab = ctx->getTab(); NdbRestarter res; + int databuffer = ctx->getProperty("DATABUFFER"); for (Uint32 i = 0; i<5; i++) { @@ -2175,7 +2176,10 @@ runBug54944(NDBT_Context* ctx, NDBT_Step hugoOps.execute_NoCommit(pNdb); } - res.insertErrorInAllNodes(8087); + if (!databuffer) + res.insertErrorInAllNodes(8087); + else + res.insertErrorInAllNodes(8096); HugoTransactions hugoTrans(*pTab); hugoTrans.loadTableStartFrom(pNdb, 50000, 100); @@ -3621,6 +3625,12 @@ TESTCASE("Bug54986", "") } TESTCASE("Bug54944", "") { + TC_PROPERTY("DATABUFFER", (Uint32)0); + INITIALIZER(runBug54944); +} +TESTCASE("Bug54944DATABUFFER", "") +{ + TC_PROPERTY("DATABUFFER", (Uint32)1); INITIALIZER(runBug54944); } TESTCASE("Bug59496_case1", "") === modified file 'storage/ndb/test/run-test/daily-basic-tests.txt' --- a/storage/ndb/test/run-test/daily-basic-tests.txt 2012-10-15 11:46:54 +0000 +++ b/storage/ndb/test/run-test/daily-basic-tests.txt 2012-10-24 11:26:37 +0000 @@ -317,6 +317,10 @@ max-time: 500 cmd: testBasic args: -n Bug54944 T1 +max-time: 500 +cmd: testBasic +args: -n Bug54944DATABUFFER T1 + max-time: 600 cmd: testBasic args: -r 10 -n Bug59496_case1 T2 No bundle (reason: useless for push emails).