List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:June 27 2011 6:24am
Subject:bzr commit into mysql-5.1-telco-7.0 branch (jonas.oreland:4473) Bug#61607
View as plain text  
#At file:///home/jonas/src/telco-7.0/ based on revid:jonas@stripped

 4473 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
=== modified file 'storage/ndb/src/mgmsrv/MgmtSrvr.cpp'
--- a/storage/ndb/src/mgmsrv/MgmtSrvr.cpp	2011-06-21 14:12:16 +0000
+++ b/storage/ndb/src/mgmsrv/MgmtSrvr.cpp	2011-06-27 06:24:29 +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:24:29 +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);
 


Attachment: [text/bzr-bundle] bzr/jonas.oreland@oracle.com-20110627062429-dy73fhubzaxw9d4m.bundle
Thread
bzr commit into mysql-5.1-telco-7.0 branch (jonas.oreland:4473) Bug#61607Jonas Oreland27 Jun