List:Commits« Previous MessageNext Message »
From:Bjorn Munch Date:January 19 2011 12:17pm
Subject:bzr commit into mysql-trunk branch (bjorn.munch:3532)
View as plain text  
#At file:///home/bm136801/my/main-tr/ based on revid:anders.song@stripped

 3532 Bjorn Munch	2011-01-19 [merge]
      merge from trunk-mtr

    modified:
      client/mysqltest.cc
      mysql-test/include/rpl_start_server.inc
      mysql-test/include/rpl_stop_server.inc
      mysql-test/lib/My/ConfigFactory.pm
      mysql-test/lib/My/CoreDump.pm
      mysql-test/lib/My/File/Path.pm
      mysql-test/lib/My/Find.pm
      mysql-test/lib/My/Options.pm
      mysql-test/lib/My/Platform.pm
      mysql-test/lib/My/SafeProcess.pm
      mysql-test/lib/My/SafeProcess/Base.pm
      mysql-test/lib/My/SafeProcess/safe_kill_win.cc
      mysql-test/lib/My/SafeProcess/safe_process.cc
      mysql-test/lib/My/SafeProcess/safe_process_win.cc
      mysql-test/lib/My/SysInfo.pm
      mysql-test/lib/My/Test.pm
      mysql-test/lib/mtr_cases.pm
      mysql-test/lib/mtr_gcov.pl
      mysql-test/lib/mtr_gprof.pl
      mysql-test/lib/mtr_io.pl
      mysql-test/lib/mtr_match.pm
      mysql-test/lib/mtr_misc.pl
      mysql-test/lib/mtr_report.pm
      mysql-test/lib/mtr_stress.pl
      mysql-test/lib/mtr_unique.pm
      mysql-test/mysql-stress-test.pl
      mysql-test/mysql-test-run.pl
      mysql-test/valgrind.supp
=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc	2011-01-12 10:22:11 +0000
+++ b/client/mysqltest.cc	2011-01-18 11:09:49 +0000
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -11,7 +11,7 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
+   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
 
 /*
   mysqltest

=== modified file 'mysql-test/include/rpl_start_server.inc'
--- a/mysql-test/include/rpl_start_server.inc	2011-01-14 10:40:20 +0000
+++ b/mysql-test/include/rpl_start_server.inc	2011-01-18 11:40:54 +0000
@@ -45,15 +45,7 @@ if ($rpl_server_parameters)
 --source include/rpl_connection.inc
 
 # Write file to make mysql-test-run.pl start up the server again
---let WRITE_TO_FILE= $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
---let WRITE_TO_VAR= $_rpl_start_server_command
-perl;
-my $file= $ENV{'WRITE_TO_FILE'};
-my $var= $ENV{'WRITE_TO_VAR'};
-open WRITE_FILE, ">> $file" or die "Error opening $file: $!";
-print WRITE_FILE $var, "\n" or die "Error appending to $file: $!";
-close WRITE_FILE or die "Error closing $file: $!";
-EOF
+--exec echo "$_rpl_start_server_command" > $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
 
 --source include/rpl_reconnect.inc
 

=== modified file 'mysql-test/include/rpl_stop_server.inc'
--- a/mysql-test/include/rpl_stop_server.inc	2011-01-14 10:40:20 +0000
+++ b/mysql-test/include/rpl_stop_server.inc	2011-01-18 11:40:54 +0000
@@ -44,9 +44,7 @@ if ($rpl_debug)
 
 # Write file to make mysql-test-run.pl expect the "crash", but don't start
 # it until it's told to
---append_file $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
-wait
-EOF
+--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
 
 # Send shutdown to the connected server and give
 # it 10 seconds to die before zapping it

=== modified file 'mysql-test/lib/My/ConfigFactory.pm'
--- a/mysql-test/lib/My/ConfigFactory.pm	2010-08-16 07:30:40 +0000
+++ b/mysql-test/lib/My/ConfigFactory.pm	2011-01-18 11:09:49 +0000
@@ -1,4 +1,20 @@
 # -*- cperl -*-
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; version 2
+# of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
 package My::ConfigFactory;
 
 use strict;

=== modified file 'mysql-test/lib/My/CoreDump.pm'
--- a/mysql-test/lib/My/CoreDump.pm	2009-03-24 13:44:21 +0000
+++ b/mysql-test/lib/My/CoreDump.pm	2011-01-18 10:03:44 +0000
@@ -1,5 +1,5 @@
 # -*- cperl -*-
-# Copyright (C) 2004-2006 MySQL AB
+# Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by

=== modified file 'mysql-test/lib/My/File/Path.pm'
--- a/mysql-test/lib/My/File/Path.pm	2009-04-01 14:23:10 +0000
+++ b/mysql-test/lib/My/File/Path.pm	2011-01-18 10:03:44 +0000
@@ -1,4 +1,19 @@
 # -*- cperl -*-
+# Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
 package My::File::Path;
 use strict;
 

=== modified file 'mysql-test/lib/My/Find.pm'
--- a/mysql-test/lib/My/Find.pm	2009-11-09 11:32:48 +0000
+++ b/mysql-test/lib/My/Find.pm	2011-01-18 10:21:37 +0000
@@ -1,5 +1,5 @@
 # -*- cperl -*-
-# Copyright (C) 2004-2006 MySQL AB
+# Copyright (C) 2008 MySQL AB
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by

=== modified file 'mysql-test/lib/My/Options.pm'
--- a/mysql-test/lib/My/Options.pm	2010-03-03 19:22:02 +0000
+++ b/mysql-test/lib/My/Options.pm	2011-01-18 10:21:37 +0000
@@ -1,5 +1,5 @@
 # -*- cperl -*-
-# Copyright (C) 2004-2006 MySQL AB
+# Copyright (C) 2008 MySQL AB
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by

=== modified file 'mysql-test/lib/My/Platform.pm'
--- a/mysql-test/lib/My/Platform.pm	2009-08-06 07:30:53 +0000
+++ b/mysql-test/lib/My/Platform.pm	2011-01-18 10:03:44 +0000
@@ -1,5 +1,5 @@
 # -*- cperl -*-
-# Copyright (C) 2004-2006 MySQL AB
+# Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by

=== modified file 'mysql-test/lib/My/SafeProcess.pm'
--- a/mysql-test/lib/My/SafeProcess.pm	2010-08-16 07:30:40 +0000
+++ b/mysql-test/lib/My/SafeProcess.pm	2011-01-18 11:09:49 +0000
@@ -1,14 +1,15 @@
 # -*- cperl -*-
-# Copyright (C) 2004-2006 MySQL AB
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
 #
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; version 2
+# of the License.
 #
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Library General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software

=== modified file 'mysql-test/lib/My/SafeProcess/Base.pm'
--- a/mysql-test/lib/My/SafeProcess/Base.pm	2009-04-23 11:35:02 +0000
+++ b/mysql-test/lib/My/SafeProcess/Base.pm	2011-01-18 10:03:44 +0000
@@ -1,5 +1,5 @@
 # -*- cperl -*-
-# Copyright (C) 2004-2006 MySQL AB
+# Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by

=== modified file 'mysql-test/lib/My/SafeProcess/safe_kill_win.cc'
--- a/mysql-test/lib/My/SafeProcess/safe_kill_win.cc	2010-07-03 23:17:03 +0000
+++ b/mysql-test/lib/My/SafeProcess/safe_kill_win.cc	2011-01-18 10:21:37 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 MySQL AB
+/* Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by

=== modified file 'mysql-test/lib/My/SafeProcess/safe_process.cc'
--- a/mysql-test/lib/My/SafeProcess/safe_process.cc	2010-07-02 18:30:47 +0000
+++ b/mysql-test/lib/My/SafeProcess/safe_process.cc	2011-01-18 10:03:44 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008 MySQL AB
+/* Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by

=== modified file 'mysql-test/lib/My/SafeProcess/safe_process_win.cc'
--- a/mysql-test/lib/My/SafeProcess/safe_process_win.cc	2010-07-03 23:17:03 +0000
+++ b/mysql-test/lib/My/SafeProcess/safe_process_win.cc	2011-01-18 10:21:37 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 MySQL AB
+/* Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by

=== modified file 'mysql-test/lib/My/SysInfo.pm'
--- a/mysql-test/lib/My/SysInfo.pm	2008-10-11 15:30:26 +0000
+++ b/mysql-test/lib/My/SysInfo.pm	2011-01-18 10:03:44 +0000
@@ -1,5 +1,5 @@
 # -*- cperl -*-
-# Copyright (C) 2004-2006 MySQL AB
+# Copyright (C) 2008 MySQL AB
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by

=== modified file 'mysql-test/lib/My/Test.pm'
--- a/mysql-test/lib/My/Test.pm	2008-11-14 10:49:12 +0000
+++ b/mysql-test/lib/My/Test.pm	2011-01-18 10:03:44 +0000
@@ -1,4 +1,18 @@
 # -*- cperl -*-
+# Copyright (C) 2008 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 
 #

=== modified file 'mysql-test/lib/mtr_cases.pm'
--- a/mysql-test/lib/mtr_cases.pm	2011-01-12 10:22:11 +0000
+++ b/mysql-test/lib/mtr_cases.pm	2011-01-18 11:09:49 +0000
@@ -1,5 +1,5 @@
 # -*- cperl -*-
-# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
 # 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by

=== modified file 'mysql-test/lib/mtr_gcov.pl'
--- a/mysql-test/lib/mtr_gcov.pl	2009-02-27 11:20:53 +0000
+++ b/mysql-test/lib/mtr_gcov.pl	2011-01-18 11:01:40 +0000
@@ -1,5 +1,5 @@
 # -*- cperl -*-
-# Copyright (C) 2004, 2006 MySQL AB
+# Copyright (C) 2004, 2006 MySQL AB, 2009 Sun Microsystems, Inc.
 # 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by

=== modified file 'mysql-test/lib/mtr_gprof.pl'
--- a/mysql-test/lib/mtr_gprof.pl	2010-01-05 20:35:50 +0000
+++ b/mysql-test/lib/mtr_gprof.pl	2011-01-18 11:11:52 +0000
@@ -1,5 +1,5 @@
 # -*- cperl -*-
-# Copyright (C) 2004 MySQL AB
+# Copyright (C) 2004 MySQL AB, 2009 Sun Microsystems, Inc.
 # 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by

=== modified file 'mysql-test/lib/mtr_io.pl'
--- a/mysql-test/lib/mtr_io.pl	2008-11-14 20:35:32 +0000
+++ b/mysql-test/lib/mtr_io.pl	2011-01-18 11:01:40 +0000
@@ -1,5 +1,5 @@
 # -*- cperl -*-
-# Copyright (C) 2004-2006 MySQL AB
+# Copyright (C) 2004-2007 MySQL AB, 2008 Sun Microsystems, Inc.
 # 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by

=== modified file 'mysql-test/lib/mtr_match.pm'
--- a/mysql-test/lib/mtr_match.pm	2008-04-08 14:51:26 +0000
+++ b/mysql-test/lib/mtr_match.pm	2011-01-18 11:01:40 +0000
@@ -1,5 +1,5 @@
 # -*- cperl -*-
-# Copyright (C) 2004-2006 MySQL AB
+# Copyright (C) 2004-2008 MySQL AB
 # 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by

=== modified file 'mysql-test/lib/mtr_misc.pl'
--- a/mysql-test/lib/mtr_misc.pl	2010-10-19 13:05:25 +0000
+++ b/mysql-test/lib/mtr_misc.pl	2011-01-18 11:09:49 +0000
@@ -1,15 +1,16 @@
 # -*- cperl -*-
-# Copyright (C) 2004-2006 MySQL AB
-# 
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-# 
+# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; version 2
+# of the License.
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-# 
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Library General Public License for more details.
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

=== modified file 'mysql-test/lib/mtr_report.pm'
--- a/mysql-test/lib/mtr_report.pm	2011-01-12 09:27:46 +0000
+++ b/mysql-test/lib/mtr_report.pm	2011-01-18 10:21:37 +0000
@@ -1,5 +1,5 @@
 # -*- cperl -*-
-# Copyright 2004-2008 MySQL AB, 2008 Sun Microsystems, Inc.
+# Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
 # 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by

=== modified file 'mysql-test/lib/mtr_stress.pl'
--- a/mysql-test/lib/mtr_stress.pl	2009-11-19 12:19:11 +0000
+++ b/mysql-test/lib/mtr_stress.pl	2011-01-18 11:01:40 +0000
@@ -1,5 +1,5 @@
 # -*- cperl -*-
-# Copyright (C) 2006 MySQL AB
+# Copyright (C) 2004-2007 MySQL AB, 2009 Sun Microsystems, Inc.
 # 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by

=== modified file 'mysql-test/lib/mtr_unique.pm'
--- a/mysql-test/lib/mtr_unique.pm	2009-04-23 11:35:02 +0000
+++ b/mysql-test/lib/mtr_unique.pm	2011-01-18 11:01:40 +0000
@@ -1,5 +1,5 @@
 # -*- cperl -*-
-# Copyright (C) 2006 MySQL AB
+# Copyright (C) 2006-2008 MySQL AB, 2009 Sun Microsystems, Inc.
 # 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by

=== modified file 'mysql-test/mysql-stress-test.pl'
--- a/mysql-test/mysql-stress-test.pl	2010-12-29 00:26:31 +0000
+++ b/mysql-test/mysql-stress-test.pl	2011-01-18 10:21:37 +0000
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# Copyright (C) 2005, 2006 MySQL AB
+# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Library General Public
@@ -12,10 +12,9 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 # Library General Public License for more details.
 #
-# You should have received a copy of the GNU Library General Public
-# License along with this library; if not, write to the Free
-# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-# MA 02111-1307, USA
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 # ======================================================================
 #                     MySQL server stress test system 

=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl	2011-01-12 15:13:48 +0000
+++ b/mysql-test/mysql-test-run.pl	2011-01-18 11:09:49 +0000
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 # -*- cperl -*-
 
-# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,8 +13,8 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 #
 ##############################################################################
@@ -292,8 +292,10 @@ our $opt_include_ndbcluster= 0;
 our $opt_skip_ndbcluster= 1;
 
 my $exe_ndbd;
+my $exe_ndbmtd;
 my $exe_ndb_mgmd;
 my $exe_ndb_waiter;
+my $exe_ndb_mgm;
 
 our $debug_compiled_binaries;
 
@@ -506,8 +508,8 @@ sub run_test_server ($$$) {
   my $num_failed_test= 0; # Number of tests failed so far
 
   # Scheduler variables
-  my $max_ndb= $childs / 2;
-  $max_ndb = 4 if $max_ndb > 4;
+  my $max_ndb= $ENV{MTR_MAX_NDB} || $childs / 2;
+  $max_ndb = $childs if $max_ndb > $childs;
   $max_ndb = 1 if $max_ndb < 1;
   my $num_ndb_tests= 0;
 
@@ -1809,16 +1811,42 @@ sub executable_setup () {
 
   if ( ! $opt_skip_ndbcluster )
   {
+    # Look for single threaded NDB
     $exe_ndbd=
       my_find_bin($bindir,
 		  ["storage/ndb/src/kernel", "libexec", "sbin", "bin"],
 		  "ndbd");
 
+    # Look for multi threaded NDB
+    $exe_ndbmtd=
+      my_find_bin($bindir,
+		  ["storage/ndb/src/kernel", "libexec", "sbin", "bin"],
+		  "ndbmtd", NOT_REQUIRED);
+    if ($exe_ndbmtd)
+    {
+      my $mtr_ndbmtd = $ENV{MTR_NDBMTD};
+      if ($mtr_ndbmtd)
+      {
+	mtr_report(" - multi threaded ndbd found, will be used always");
+	$exe_ndbd = $exe_ndbmtd;
+      }
+      else
+      {
+	mtr_report(" - multi threaded ndbd found, will be ".
+		   "used \"round robin\"");
+      }
+    }
+
     $exe_ndb_mgmd=
       my_find_bin($bindir,
 		  ["storage/ndb/src/mgmsrv", "libexec", "sbin", "bin"],
 		  "ndb_mgmd");
 
+    $exe_ndb_mgm=
+      my_find_bin($bindir,
+                  ["storage/ndb/src/mgmclient", "bin"],
+                  "ndb_mgm");
+
     $exe_ndb_waiter=
       my_find_bin($bindir,
 		  ["storage/ndb/tools/", "bin"],
@@ -2624,6 +2652,27 @@ sub ndb_mgmd_wait_started($) {
   return 1;
 }
 
+sub ndb_mgmd_stop{
+  my $ndb_mgmd= shift or die "usage: ndb_mgmd_stop(<ndb_mgmd>)";
+
+  my $host=$ndb_mgmd->value('HostName');
+  my $port=$ndb_mgmd->value('PortNumber');
+  mtr_verbose("Stopping cluster '$host:$port'");
+
+  my $args;
+  mtr_init_args(\$args);
+  mtr_add_arg($args, "--ndb-connectstring=%s:%s", $host,$port);
+  mtr_add_arg($args, "-e");
+  mtr_add_arg($args, "shutdown");
+
+  My::SafeProcess->run
+    (
+     name          => "ndb_mgm shutdown $host:$port",
+     path          => $exe_ndb_mgm,
+     args          => \$args,
+     output         => "/dev/null",
+    );
+}
 
 sub ndb_mgmd_start ($$) {
   my ($cluster, $ndb_mgmd)= @_;
@@ -2651,6 +2700,7 @@ sub ndb_mgmd_start ($$) {
      error         => $path_ndb_mgmd_log,
      append        => 1,
      verbose       => $opt_verbose,
+     shutdown      => sub { ndb_mgmd_stop($ndb_mgmd) },
     );
   mtr_verbose("Started $ndb_mgmd->{proc}");
 
@@ -2666,6 +2716,12 @@ sub ndb_mgmd_start ($$) {
   return 0;
 }
 
+sub ndbd_stop {
+  # Intentionally left empty, ndbd nodes will be shutdown
+  # by sending "shutdown" to ndb_mgmd
+}
+
+my $exe_ndbmtd_counter= 0;
 
 sub ndbd_start {
   my ($cluster, $ndbd)= @_;
@@ -2683,17 +2739,24 @@ sub ndbd_start {
 
 # > 5.0 { 'character-sets-dir' => \&fix_charset_dir },
 
+  my $exe= $exe_ndbd;
+  if ($exe_ndbmtd and ($exe_ndbmtd_counter++ % 2) == 0)
+  {
+    # Use ndbmtd every other time
+    $exe= $exe_ndbmtd;
+  }
 
   my $path_ndbd_log= "$dir/ndbd.log";
   my $proc= My::SafeProcess->new
     (
      name          => $ndbd->after('cluster_config.'),
-     path          => $exe_ndbd,
+     path          => $exe,
      args          => \$args,
      output        => $path_ndbd_log,
      error         => $path_ndbd_log,
      append        => 1,
      verbose       => $opt_verbose,
+     shutdown      => sub { ndbd_stop($ndbd) },
     );
   mtr_verbose("Started $proc");
 

=== modified file 'mysql-test/valgrind.supp'
--- a/mysql-test/valgrind.supp	2010-12-29 00:38:59 +0000
+++ b/mysql-test/valgrind.supp	2011-01-18 11:09:49 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2005, 2008 MySQL AB
+# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Library General Public
@@ -10,10 +10,9 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 # Library General Public License for more details.
 #
-# You should have received a copy of the GNU Library General Public
-# License along with this library; if not, write to the Free
-# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-# MA 02111-1307, USA
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 #
 # Suppress some common (not fatal) errors in system libraries found by valgrind

No bundle (reason: revision is a merge).
Thread
bzr commit into mysql-trunk branch (bjorn.munch:3532) Bjorn Munch19 Jan