List:Commits« Previous MessageNext Message »
From:jonas Date:May 27 2008 7:57pm
Subject:bk commit into 5.1 tree (jonas:1.2610)
View as plain text  
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, 2008-05-27 21:57:28+02:00, jonas@stripped +4 -0
  ndb -
    impl. round-robin usage of ndbmtd in autotest

  storage/ndb/test/run-test/conf-dl145a.cnf@stripped, 2008-05-27 21:57:26+02:00, jonas@stripped +1 -0
    impl. round-robin usage of ndbmtd in autotest

  storage/ndb/test/run-test/conf-ndbmaster.cnf@stripped, 2008-05-27 21:57:26+02:00, jonas@stripped +1 -0
    impl. round-robin usage of ndbmtd in autotest

  storage/ndb/test/run-test/main.cpp@stripped, 2008-05-27 21:57:26+02:00, jonas@stripped +6 -1
    impl. round-robin usage of ndbmtd in autotest

  storage/ndb/test/run-test/setup.cpp@stripped, 2008-05-27 21:57:26+02:00, jonas@stripped +12 -1
    impl. round-robin usage of ndbmtd in autotest

diff -Nrup a/storage/ndb/test/run-test/conf-dl145a.cnf b/storage/ndb/test/run-test/conf-dl145a.cnf
--- a/storage/ndb/test/run-test/conf-dl145a.cnf	2007-11-15 08:56:58 +01:00
+++ b/storage/ndb/test/run-test/conf-dl145a.cnf	2008-05-27 21:57:26 +02:00
@@ -2,6 +2,7 @@
 basedir = CHOOSE_dir
 baseport = 14000
 clusters = .2node
+mt = 1
 
 [ndb_mgmd]
 
diff -Nrup a/storage/ndb/test/run-test/conf-ndbmaster.cnf b/storage/ndb/test/run-test/conf-ndbmaster.cnf
--- a/storage/ndb/test/run-test/conf-ndbmaster.cnf	2007-02-13 02:38:48 +01:00
+++ b/storage/ndb/test/run-test/conf-ndbmaster.cnf	2008-05-27 21:57:26 +02:00
@@ -2,6 +2,7 @@
 basedir = CHOOSE_dir
 baseport = 14000
 clusters = .4node
+mt = 1
 
 [ndb_mgmd]
 
diff -Nrup a/storage/ndb/test/run-test/main.cpp b/storage/ndb/test/run-test/main.cpp
--- a/storage/ndb/test/run-test/main.cpp	2008-02-21 14:57:39 +01:00
+++ b/storage/ndb/test/run-test/main.cpp	2008-05-27 21:57:26 +02:00
@@ -59,6 +59,8 @@ int          g_baseport = 10000;
 int          g_fqpn = 0;
 int          g_fix_nodeid= 0;
 int          g_default_ports = 0;
+int          g_mt = 0;
+int          g_mt_rr = 0;
 
 const char * g_cwd = 0;
 const char * g_basedir = 0;
@@ -142,8 +144,11 @@ static struct my_option g_options[] =
     (uchar **) &g_mode, (uchar **) &g_mode,
     0, GET_INT, REQUIRED_ARG, g_mode, 0, 0, 0, 0, 0 },
   { "quit", 256, "Quit before starting tests",
-    (uchar **) &g_mode, (uchar **) &g_do_quit,
+    (uchar **) &g_do_quit, (uchar **) &g_do_quit,
     0, GET_BOOL, NO_ARG, g_do_quit, 0, 0, 0, 0, 0 },
+  { "mt", 256, "Use ndbmtd (0 = never, 1 = round-robin, 2 = only)",
+    (uchar **) &g_mt, (uchar **) &g_mt,
+    0, GET_INT, REQUIRED_ARG, g_mt, 0, 0, 0, 0, 0 },
   { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
 };
 
diff -Nrup a/storage/ndb/test/run-test/setup.cpp b/storage/ndb/test/run-test/setup.cpp
--- a/storage/ndb/test/run-test/setup.cpp	2008-02-21 14:57:39 +01:00
+++ b/storage/ndb/test/run-test/setup.cpp	2008-05-27 21:57:26 +02:00
@@ -4,6 +4,9 @@
 #include <my_getopt.h>
 #include <NdbOut.hpp>
 
+extern int g_mt;
+extern int g_mt_rr;
+
 static atrt_host * find(const char * hostname, Vector<atrt_host*>&);
 static bool load_process(atrt_config&, atrt_cluster&, atrt_process::Type, 
 			 size_t idx, const char * hostname);
@@ -303,8 +306,16 @@ load_process(atrt_config& config, atrt_c
   } 
   case atrt_process::AP_NDBD:
   {
+    if (g_mt == 0 || (g_mt == 1 && ((g_mt_rr++) & 1) == 0))
+    {
+      proc.m_proc.m_path.assign(g_prefix).append("/libexec/ndbd");
+    }
+    else
+    {
+      proc.m_proc.m_path.assign(g_prefix).append("/libexec/ndbmtd");
+    }
+    
     proc.m_proc.m_name.assfmt("%d-%s", proc_no, "ndbd");
-    proc.m_proc.m_path.assign(g_prefix).append("/libexec/ndbd");
     proc.m_proc.m_args.assfmt("--defaults-file=%s/my.cnf",
 			      proc.m_host->m_basedir.c_str());
     proc.m_proc.m_args.appfmt(" --defaults-group-suffix=%s",
Thread
bk commit into 5.1 tree (jonas:1.2610)jonas27 May