From: Date: March 27 2007 2:36pm Subject: bk commit into 5.1 tree (jonas:1.2503) List-Archive: http://lists.mysql.com/commits/23005 Message-Id: <20070327123646.BB82047BAE4@perch.ndb.mysql.com> Below is the list of changes that have just been committed into a local 5.1 repository of jonas. When jonas does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2007-03-27 14:36:41+02:00, jonas@stripped +6 -0 Merge joreland@stripped:/home/bk/mysql-5.1-telco into perch.ndb.mysql.com:/home/jonas/src/51-telco MERGE: 1.2500.1.3 storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp@stripped, 2007-03-27 14:36:37+02:00, jonas@stripped +0 -0 Auto merged MERGE: 1.35.1.3 storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp@stripped, 2007-03-27 14:36:37+02:00, jonas@stripped +0 -0 Auto merged MERGE: 1.120.1.3 storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp@stripped, 2007-03-27 14:36:37+02:00, jonas@stripped +0 -0 Auto merged MERGE: 1.149.1.3 storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp@stripped, 2007-03-27 14:36:37+02:00, jonas@stripped +0 -0 Auto merged MERGE: 1.41.1.2 storage/ndb/test/ndbapi/testNodeRestart.cpp@stripped, 2007-03-27 14:36:37+02:00, jonas@stripped +0 -0 Auto merged MERGE: 1.57.1.3 storage/ndb/test/run-test/daily-basic-tests.txt@stripped, 2007-03-27 14:36:37+02:00, jonas@stripped +0 -0 Auto merged MERGE: 1.84.1.3 # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: jonas # Host: perch.ndb.mysql.com # Root: /home/jonas/src/51-telco/RESYNC --- 1.86/storage/ndb/test/run-test/daily-basic-tests.txt 2007-03-27 14:36:46 +02:00 +++ 1.87/storage/ndb/test/run-test/daily-basic-tests.txt 2007-03-27 14:36:46 +02:00 @@ -801,6 +801,10 @@ args: -n Bug25468 T1 max-time: 1000 +cmd: testNodeRestart +args: -n Bug27466 T1 + +max-time: 1000 cmd: test_event args: -l 10 -n Bug27169 T1 --- 1.37/storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp 2007-03-27 14:36:46 +02:00 +++ 1.38/storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp 2007-03-27 14:36:46 +02:00 @@ -74,7 +74,6 @@ #define ZWRONG_FAILURE_NUMBER_ERROR 302 #define ZWRONG_START_NODE_ERROR 303 #define ZNO_REPLICA_FOUND_ERROR 304 -#define ZNODE_START_DISALLOWED_ERROR 309 // -------------------------------------- // Codes from LQH --- 1.122/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2007-03-27 14:36:46 +02:00 +++ 1.123/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2007-03-27 14:36:46 +02:00 @@ -1772,7 +1772,8 @@ { jamEntry(); Uint32 errorCode = signal->theData[1]; - if (errorCode == StartPermRef::ZNODE_ALREADY_STARTING_ERROR) { + if (errorCode == StartPermRef::ZNODE_ALREADY_STARTING_ERROR || + errorCode == StartPermRef::ZNODE_START_DISALLOWED_ERROR) { jam(); /*-----------------------------------------------------------------------*/ // The master was busy adding another node. We will wait for a second and @@ -2122,49 +2123,49 @@ TstartNode_or_blockref = signal->theData[0]; TsendNodeId = signal->theData[1]; - if (TstartNode_or_blockref == clocallqhblockref) { - jam(); - /*-----------------------------------------------------------------------*/ - // THIS SIGNAL CAME FROM THE LOCAL LQH BLOCK. - // WE WILL NOW SEND INCLUDE TO THE TC BLOCK. - /*-----------------------------------------------------------------------*/ - signal->theData[0] = reference(); - signal->theData[1] = c_nodeStartSlave.nodeId; - sendSignal(clocaltcblockref, GSN_INCL_NODEREQ, signal, 2, JBB); - return; - }//if - if (TstartNode_or_blockref == clocaltcblockref) { - jam(); - /*----------------------------------------------------------------------*/ - // THIS SIGNAL CAME FROM THE LOCAL LQH BLOCK. - // WE WILL NOW SEND INCLUDE TO THE DICT BLOCK. - /*----------------------------------------------------------------------*/ - signal->theData[0] = reference(); - signal->theData[1] = c_nodeStartSlave.nodeId; - sendSignal(cdictblockref, GSN_INCL_NODEREQ, signal, 2, JBB); - return; - }//if - if (TstartNode_or_blockref == cdictblockref) { - jam(); - /*-----------------------------------------------------------------------*/ - // THIS SIGNAL CAME FROM THE LOCAL DICT BLOCK. WE WILL NOW SEND CONF TO THE - // BACKUP. - /*-----------------------------------------------------------------------*/ - signal->theData[0] = reference(); - signal->theData[1] = c_nodeStartSlave.nodeId; - sendSignal(BACKUP_REF, GSN_INCL_NODEREQ, signal, 2, JBB); - - // Suma will not send response to this for now, later... - sendSignal(SUMA_REF, GSN_INCL_NODEREQ, signal, 2, JBB); - return; - }//if - if (TstartNode_or_blockref == numberToRef(BACKUP, getOwnNodeId())){ - jam(); - signal->theData[0] = c_nodeStartSlave.nodeId; - signal->theData[1] = cownNodeId; - sendSignal(cmasterdihref, GSN_INCL_NODECONF, signal, 2, JBB); - c_nodeStartSlave.nodeId = 0; - return; + static Uint32 blocklist[] = { + clocallqhblockref, + clocaltcblockref, + cdictblockref, + 0, + 0, + 0 + }; + blocklist[3] = numberToRef(BACKUP, getOwnNodeId()); + blocklist[4] = numberToRef(SUMA, getOwnNodeId()); + + Uint32 i = 0; + for (Uint32 i = 0; blocklist[i] != 0; i++) + { + if (TstartNode_or_blockref == blocklist[i]) + { + jam(); + if (getNodeStatus(c_nodeStartSlave.nodeId) == NodeRecord::ALIVE && + blocklist[i+1] != 0) + { + /** + * Send to next in block list + */ + jam(); + signal->theData[0] = reference(); + signal->theData[1] = c_nodeStartSlave.nodeId; + sendSignal(blocklist[i+1], GSN_INCL_NODEREQ, signal, 2, JBB); + return; + } + else + { + /** + * All done, reply to master + */ + jam(); + signal->theData[0] = c_nodeStartSlave.nodeId; + signal->theData[1] = cownNodeId; + sendSignal(cmasterdihref, GSN_INCL_NODECONF, signal, 2, JBB); + + c_nodeStartSlave.nodeId = 0; + return; + } + } } ndbrequire(cmasterdihref = reference()); @@ -2283,7 +2284,7 @@ StartInfoRef *const ref =(StartInfoRef*)&signal->theData[0]; ref->startingNodeId = startNode; ref->sendingNodeId = cownNodeId; - ref->errorCode = ZNODE_START_DISALLOWED_ERROR; + ref->errorCode = StartPermRef::ZNODE_START_DISALLOWED_ERROR; sendSignal(cmasterdihref, GSN_START_INFOREF, signal, StartInfoRef::SignalLength, JBB); return; --- 1.151/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp 2007-03-27 14:36:46 +02:00 +++ 1.152/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp 2007-03-27 14:36:46 +02:00 @@ -312,6 +312,19 @@ hostptr.p->hostStatus = HS_ALIVE; signal->theData[0] = cownref; c_alive_nodes.set(hostptr.i); + + if (ERROR_INSERTED(8039)) + { + CLEAR_ERROR_INSERT_VALUE; + Uint32 save = signal->theData[0]; + signal->theData[0] = 9999; + sendSignal(numberToRef(CMVMI, hostptr.i), + GSN_NDB_TAMPER, signal, 1, JBB); + signal->theData[0] = save; + sendSignalWithDelay(tblockref, GSN_INCL_NODECONF, signal, 5000, 1); + return; + } + sendSignal(tblockref, GSN_INCL_NODECONF, signal, 1, JBB); } --- 1.43/storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp 2007-03-27 14:36:46 +02:00 +++ 1.44/storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp 2007-03-27 14:36:46 +02:00 @@ -517,7 +517,7 @@ /*****************************************/ signal->theData[0] = ZREPORT_MEMORY_USAGE; signal->theData[1] = 0; - sendSignalWithDelay(reference(), GSN_CONTINUEB, signal, 1000, 1); + sendSignalWithDelay(reference(), GSN_CONTINUEB, signal, 1000, 2); break; default: jam(); --- 1.59/storage/ndb/test/ndbapi/testNodeRestart.cpp 2007-03-27 14:36:46 +02:00 +++ 1.60/storage/ndb/test/ndbapi/testNodeRestart.cpp 2007-03-27 14:36:46 +02:00 @@ -1517,6 +1517,56 @@ return NDBT_OK; } +int +runBug27466(NDBT_Context* ctx, NDBT_Step* step) +{ + int result = NDBT_OK; + int loops = ctx->getNumLoops(); + int records = ctx->getNumRecords(); + NdbRestarter res; + + if (res.getNumDbNodes() < 2) + { + return NDBT_OK; + } + + Uint32 pos = 0; + for (Uint32 i = 0; i