From: Maitrayi Sabaratnam Date: September 7 2012 4:06pm Subject: bzr push into mysql-5.5-cluster-7.2 branch (maitrayi.sabaratnam:3985 to 3986) List-Archive: http://lists.mysql.com/commits/144712 Message-Id: <20120907160630.15759.82329.3986@asator03-z7.no.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3986 Maitrayi Sabaratnam 2012-09-07 [merge] Merge 7.1->7.2 In addition to the fix for Bug 14582294 - SPJ: GETNODES DOES NOT RETURN CORRCT ERROR CODE and other merges, this adds a FI test case to testSpj, to verify the fix. This test case is not present in 7.0 and 7.1. modified: storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp storage/ndb/src/kernel/blocks/dbspj/DbspjMain.cpp storage/ndb/test/ndbapi/testDict.cpp storage/ndb/test/ndbapi/testSpj.cpp 3985 Martin Skold 2012-09-03 Supressed warnings imported from mysql-5.5 modified: support-files/compiler_warnings.supp === modified file 'storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp' --- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2012-08-29 13:39:37 +0000 +++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2012-09-07 15:52:18 +0000 @@ -9241,6 +9241,13 @@ loop: signal->theData[1]= ZUNDEFINED_FRAGMENT_ERROR; return; } + if (ERROR_INSERTED_CLEAR(7240)) + { + thrjam(jambuf); + conf->zero= 1; //Indicate error; + signal->theData[1]= ZUNDEFINED_FRAGMENT_ERROR; + return; + } getFragstore(tabPtr.p, fragId, fragPtr); Uint32 nodeCount = extractNodeInfo(jambuf, fragPtr.p, conf->nodes); Uint32 sig2 = (nodeCount - 1) + === modified file 'storage/ndb/src/kernel/blocks/dbspj/DbspjMain.cpp' --- a/storage/ndb/src/kernel/blocks/dbspj/DbspjMain.cpp 2012-08-24 12:07:17 +0000 +++ b/storage/ndb/src/kernel/blocks/dbspj/DbspjMain.cpp 2012-09-07 15:52:18 +0000 @@ -3991,7 +3991,6 @@ Dbspj::computePartitionHash(Signal* sign Uint32 Dbspj::getNodes(Signal* signal, BuildKeyReq& dst, Uint32 tableId) { - Uint32 err; DiGetNodesReq * req = (DiGetNodesReq *)&signal->theData[0]; req->tableId = tableId; req->hashValue = dst.hashInfo[1]; @@ -4009,7 +4008,7 @@ Dbspj::getNodes(Signal* signal, BuildKey #endif DiGetNodesConf * conf = (DiGetNodesConf *)&signal->theData[0]; - err = signal->theData[0]; + const Uint32 err = signal->theData[0] ? signal->theData[1] : 0; Uint32 Tdata2 = conf->reqinfo; Uint32 nodeId = conf->nodes[0]; Uint32 instanceKey = (Tdata2 >> 24) & 127; === modified file 'storage/ndb/test/ndbapi/testDict.cpp' --- a/storage/ndb/test/ndbapi/testDict.cpp 2012-08-28 11:22:02 +0000 +++ b/storage/ndb/test/ndbapi/testDict.cpp 2012-08-30 08:40:49 +0000 @@ -32,6 +32,7 @@ #include #include #include +#include <../src/kernel/ndbd.hpp> #define ERR_INSERT_MASTER_FAILURE1 6013 #define ERR_INSERT_MASTER_FAILURE2 6014 @@ -9123,6 +9124,16 @@ cleanup: is.drop_systables(pNdb); } + // Ensure that nodes will start after error inserts again. + { + const int restartState[] = + { DumpStateOrd::CmvmiSetRestartOnErrorInsert, NRT_DoStart_Restart }; + + require(res.dumpStateAllNodes(restartState, + sizeof restartState/sizeof restartState[0]) + == 0); + } + return NDBT_OK; err: === modified file 'storage/ndb/test/ndbapi/testSpj.cpp' --- a/storage/ndb/test/ndbapi/testSpj.cpp 2012-08-24 12:07:17 +0000 +++ b/storage/ndb/test/ndbapi/testSpj.cpp 2012-09-07 15:52:18 +0000 @@ -116,6 +116,7 @@ runLookupJoinError(NDBT_Context* ctx, ND NdbRestarter restarter; int lookupFaults[] = { + 7240, // DIGETNODESREQ returns error 17001, 17005, 17006, 17008, 17012, // testing abort in :execDIH_SCAN_TAB_CONF 17013, // Simulate DbspjErr::InvalidRequest @@ -209,6 +210,7 @@ runScanJoinError(NDBT_Context* ctx, NDBT NdbRestarter restarter; int scanFaults[] = { + 7240, // DIGETNODESREQ returns error 17002, 17004, 17005, 17006, 17008, 17012, // testing abort in :execDIH_SCAN_TAB_CONF 17013, // Simulate DbspjErr::InvalidRequest No bundle (reason: useless for push emails).