From: Jonas Oreland Date: June 27 2011 6:31am Subject: bzr push into mysql-5.1-telco-7.0 branch (jonas.oreland:4478 to 4479) Bug#61607 List-Archive: http://lists.mysql.com/commits/139876 X-Bug: 61607 Message-Id: <20110627063114.C6BC59E4FF2@perch.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 4479 Jonas Oreland 2011-06-27 ndb - bug#61607 - don't count down nodes as failed in shutdown modified: storage/ndb/src/mgmsrv/MgmtSrvr.cpp storage/ndb/test/ndbapi/testMgmd.cpp 4478 jonas oreland 2011-06-25 ndb - fix compiler warning in ha_ndb_index_stat debug-printout modified: sql/ha_ndb_index_stat.cc === modified file 'storage/ndb/src/mgmsrv/MgmtSrvr.cpp' --- a/storage/ndb/src/mgmsrv/MgmtSrvr.cpp 2011-06-22 08:57:03 +0000 +++ b/storage/ndb/src/mgmsrv/MgmtSrvr.cpp 2011-06-27 06:26:01 +0000 @@ -1081,10 +1081,6 @@ MgmtSrvr::sendall_STOP_REQ(NodeBitmask & else failed++; } - else - { - failed++; - } } } === modified file 'storage/ndb/test/ndbapi/testMgmd.cpp' --- a/storage/ndb/test/ndbapi/testMgmd.cpp 2011-06-21 13:10:37 +0000 +++ b/storage/ndb/test/ndbapi/testMgmd.cpp 2011-06-27 06:26:01 +0000 @@ -280,6 +280,8 @@ public: } + NdbMgmHandle handle() { return m_mgmd_client.handle(); } + private: bool get_section_string(const Properties& config, @@ -1099,6 +1101,55 @@ int runTestBug12352191(NDBT_Context* ctx } +int +runBug61607(NDBT_Context* ctx, NDBT_Step* step) +{ + NDBT_Workingdir wd("test_mgmd"); // temporary working directory + + // Create config.ini + const int cnt_mgmd = 1; + Properties config = ConfigFactory::create(cnt_mgmd); + CHECK(ConfigFactory::write_config_ini(config, + path(wd.path(), + "config.ini", + NULL).c_str())); + // Start ndb_mgmd(s) + MgmdProcessList mgmds; + for (int i = 1; i <= cnt_mgmd; i++) + { + Mgmd* mgmd = new Mgmd(i); + mgmds.push_back(mgmd); + CHECK(mgmd->start_from_config_ini(wd.path())); + } + + // Connect the ndb_mgmd(s) + for (unsigned i = 0; i < mgmds.size(); i++) + CHECK(mgmds[i]->connect(config)); + + // wait for confirmed config + for (unsigned i = 0; i < mgmds.size(); i++) + CHECK(mgmds[i]->wait_confirmed_config()); + + // Check binary config files created + CHECK(file_exists(path(wd.path(), + "ndb_1_config.bin.1", + NULL).c_str())); + + int no_of_nodes = 0; + int * node_ids = 0; + int initialstart = 0; + int nostart = 0; + int abort = 0; + int force = 0; + int need_disconnect = 0; + int res = ndb_mgm_restart4(mgmds[0]->handle(), no_of_nodes, node_ids, + initialstart, nostart, abort, force, + &need_disconnect); + + + return res == 0 ? NDBT_OK : NDBT_FAILED; +} + NDBT_TESTSUITE(testMgmd); DRIVER(DummyDriver); /* turn off use of NdbApi */ @@ -1151,6 +1202,10 @@ TESTCASE("Bug12352191", { INITIALIZER(runTestBug12352191); } +TESTCASE("Bug61607", "") +{ + INITIALIZER(runBug61607); +} NDBT_TESTSUITE_END(testMgmd); No bundle (reason: useless for push emails).