From: Date: October 26 2007 7:44am Subject: bk commit into 5.1 tree (jonas:1.2169) BUG#31701 List-Archive: http://lists.mysql.com/commits/36400 X-Bug: 31701 Message-Id: <20071026054427.B5AA27CCF54@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-10-26 07:44:21+02:00, jonas@stripped +4 -0 ndb - bug#31701 - incorrect check in suma for buffer/no buffer (recommit in drop6) storage/ndb/src/kernel/blocks/ERROR_codes.txt@stripped, 2007-10-26 07:44:19+02:00, jonas@stripped +1 -1 new error code storage/ndb/src/kernel/blocks/suma/Suma.cpp@stripped, 2007-10-26 07:44:19+02:00, jonas@stripped +4 -2 add correct check for buffer/no buffer storage/ndb/test/ndbapi/test_event.cpp@stripped, 2007-10-26 07:44:19+02:00, jonas@stripped +88 -0 testcase storage/ndb/test/run-test/daily-basic-tests.txt@stripped, 2007-10-26 07:44:20+02:00, jonas@stripped +4 -0 testcase # 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/drop6 --- 1.59/storage/ndb/test/run-test/daily-basic-tests.txt 2007-10-26 07:44:27 +02:00 +++ 1.60/storage/ndb/test/run-test/daily-basic-tests.txt 2007-10-26 07:44:27 +02:00 @@ -799,3 +799,7 @@ cmd: testNodeRestart args: -n Bug31525 T1 +max-time: 300 +cmd: test_event +args: -n Bug31701 T1 + --- 1.27/storage/ndb/src/kernel/blocks/ERROR_codes.txt 2007-10-26 07:44:27 +02:00 +++ 1.28/storage/ndb/src/kernel/blocks/ERROR_codes.txt 2007-10-26 07:44:27 +02:00 @@ -11,7 +11,7 @@ Next BACKUP 10022 Next DBUTIL 11002 Next DBTUX 12008 -Next SUMA 13001 +Next SUMA 13034 TESTING NODE FAILURE, ARBITRATION --------------------------------- --- 1.40/storage/ndb/src/kernel/blocks/suma/Suma.cpp 2007-10-26 07:44:27 +02:00 +++ 1.41/storage/ndb/src/kernel/blocks/suma/Suma.cpp 2007-10-26 07:44:27 +02:00 @@ -3469,6 +3469,8 @@ if(m_gcp_complete_rep_count && !c_subscriber_nodes.isclear()) { + CRASH_INSERTION(13033); + NodeReceiverGroup rg(API_CLUSTERMGR, c_subscriber_nodes); sendSignal(rg, GSN_SUB_GCP_COMPLETE_REP, signal, SubGcpCompleteRep::SignalLength, JBB); @@ -3494,8 +3496,8 @@ { if(m_active_buckets.get(i)) continue; - - if(c_buckets[i].m_buffer_tail != RNIL) + + if (!c_subscriber_nodes.isclear()) { Uint32* dst; get_buffer_ptr(signal, i, gci, 0); --- 1.18/storage/ndb/test/ndbapi/test_event.cpp 2007-10-26 07:44:27 +02:00 +++ 1.19/storage/ndb/test/ndbapi/test_event.cpp 2007-10-26 07:44:27 +02:00 @@ -22,6 +22,7 @@ #include #include #include +#include #define GETNDB(ps) ((NDBT_NdbApiStep*)ps)->getNdb() @@ -1730,6 +1731,85 @@ return NDBT_OK; } +int +runBug31701(NDBT_Context* ctx, NDBT_Step* step) +{ + int result = NDBT_OK; + + NdbRestarter restarter; + + if (restarter.getNumDbNodes() < 2){ + ctx->stopTest(); + return NDBT_OK; + } + // This should really wait for applier to start...10s is likely enough + NdbSleep_SecSleep(10); + + int nodeId = restarter.getDbNodeId(rand() % restarter.getNumDbNodes()); + + int val2[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 1 }; + if (restarter.dumpStateOneNode(nodeId, val2, 2)) + return NDBT_FAILED; + + restarter.insertErrorInNode(nodeId, 13033); + if (restarter.waitNodesNoStart(&nodeId, 1)) + return NDBT_FAILED; + + if (restarter.startNodes(&nodeId, 1)) + return NDBT_FAILED; + + if (restarter.waitClusterStarted()) + return NDBT_FAILED; + + + int records = ctx->getNumRecords(); + HugoTransactions hugoTrans(*ctx->getTab()); + + if(ctx->getPropertyWait("LastGCI", ~(Uint32)0)) + { + g_err << "FAIL " << __LINE__ << endl; + return NDBT_FAILED; + } + + hugoTrans.clearTable(GETNDB(step), 0); + + if (hugoTrans.loadTable(GETNDB(step), 3*records, 1, true, 1) != 0){ + g_err << "FAIL " << __LINE__ << endl; + return NDBT_FAILED; + } + + if (hugoTrans.pkDelRecords(GETNDB(step), 3*records, 1, true, 1) != 0){ + g_err << "FAIL " << __LINE__ << endl; + return NDBT_FAILED; + } + if (hugoTrans.loadTable(GETNDB(step), records, 1, true, 1) != 0){ + g_err << "FAIL " << __LINE__ << endl; + return NDBT_FAILED; + } + if (hugoTrans.pkUpdateRecords(GETNDB(step), records, 1, 1) != 0){ + g_err << "FAIL " << __LINE__ << endl; + return NDBT_FAILED; + } + if (hugoTrans.pkUpdateRecords(GETNDB(step), records, 1, 1) != 0){ + g_err << "FAIL " << __LINE__ << endl; + return NDBT_FAILED; + } + if (hugoTrans.pkUpdateRecords(GETNDB(step), records, 1, 1) != 0){ + g_err << "FAIL " << __LINE__ << endl; + return NDBT_FAILED; + } + + ctx->setProperty("LastGCI", hugoTrans.m_latest_gci); + if(ctx->getPropertyWait("LastGCI", ~(Uint32)0)) + { + g_err << "FAIL " << __LINE__ << endl; + return NDBT_FAILED; + } + + ctx->stopTest(); + return NDBT_OK; +} + NDBT_TESTSUITE(test_event); TESTCASE("BasicEventOperation", "Verify that we can listen to Events" @@ -1829,6 +1909,14 @@ STEP(runScanUpdateUntilStopped); STEP(runRestarterLoop); FINALIZER(runDropEvent); +} +TESTCASE("Bug31701", ""){ + INITIALIZER(runCreateEvent); + INITIALIZER(runCreateShadowTable); + STEP(runEventApplier); + STEP(runBug31701); + FINALIZER(runDropEvent); + FINALIZER(runDropShadowTable); } NDBT_TESTSUITE_END(test_event);