summaryrefslogtreecommitdiff
path: root/mysql-test/lib
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/lib')
-rw-r--r--mysql-test/lib/My/CoreDump.pm10
-rw-r--r--mysql-test/lib/My/SafeProcess/CMakeLists.txt20
-rw-r--r--mysql-test/lib/My/SafeProcess/safe_process.cc2
-rw-r--r--mysql-test/lib/My/SysInfo.pm4
-rwxr-xr-xmysql-test/lib/v1/mysql-test-run.pl11
5 files changed, 30 insertions, 17 deletions
diff --git a/mysql-test/lib/My/CoreDump.pm b/mysql-test/lib/My/CoreDump.pm
index 419a0e7f39f..0e90967ef95 100644
--- a/mysql-test/lib/My/CoreDump.pm
+++ b/mysql-test/lib/My/CoreDump.pm
@@ -1,5 +1,5 @@
# -*- cperl -*-
-# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2013, 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
@@ -255,13 +255,17 @@ EOF
sub show {
- my ($class, $core_name, $exe_mysqld)= @_;
+ my ($class, $core_name, $exe_mysqld, $parallel)= @_;
$hint_mysqld= $exe_mysqld;
# On Windows, rely on cdb to be there...
if (IS_WINDOWS)
{
- _cdb($core_name);
+ # Starting cdb is unsafe when used with --parallel > 1 option
+ if ( $parallel < 2 )
+ {
+ _cdb($core_name);
+ }
return;
}
diff --git a/mysql-test/lib/My/SafeProcess/CMakeLists.txt b/mysql-test/lib/My/SafeProcess/CMakeLists.txt
index 95e23756c30..7d39129d0f5 100644
--- a/mysql-test/lib/My/SafeProcess/CMakeLists.txt
+++ b/mysql-test/lib/My/SafeProcess/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2013, 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,6 +13,10 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+IF (NOT INSTALL_MYSQLTESTDIR)
+ RETURN()
+ENDIF()
+
SET(INSTALL_ARGS
DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess"
COMPONENT Test
@@ -25,8 +29,16 @@ ELSE()
MYSQL_ADD_EXECUTABLE(my_safe_process safe_process.cc ${INSTALL_ARGS})
ENDIF()
-INSTALL(TARGETS my_safe_process DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess" COMPONENT Test)
+INSTALL(TARGETS my_safe_process
+ DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess" COMPONENT Test
+)
+
IF(WIN32)
- INSTALL(TARGETS my_safe_kill DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess" COMPONENT Test)
+ INSTALL(TARGETS my_safe_kill
+ DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess" COMPONENT Test
+ )
ENDIF()
-INSTALL(FILES Base.pm DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess" COMPONENT Test)
+
+INSTALL(FILES Base.pm
+ DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess" COMPONENT Test
+)
diff --git a/mysql-test/lib/My/SafeProcess/safe_process.cc b/mysql-test/lib/My/SafeProcess/safe_process.cc
index f41a77ff6ac..007acf77617 100644
--- a/mysql-test/lib/My/SafeProcess/safe_process.cc
+++ b/mysql-test/lib/My/SafeProcess/safe_process.cc
@@ -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 Street, Fifth Floor, Boston, MA 02110-1301, USA */
/*
diff --git a/mysql-test/lib/My/SysInfo.pm b/mysql-test/lib/My/SysInfo.pm
index 28660f44bae..36c50ab91d1 100644
--- a/mysql-test/lib/My/SysInfo.pm
+++ b/mysql-test/lib/My/SysInfo.pm
@@ -1,5 +1,5 @@
# -*- cperl -*-
-# Copyright (c) 2008 MySQL AB, 2008 Sun Microsystems, Inc.
+# Copyright (c) 2013 MySQL AB, 2008 Sun Microsystems, Inc.
# Use is subject to license terms.
#
# This program is free software; you can redistribute it and/or modify
@@ -60,7 +60,7 @@ sub _cpuinfo {
}
# Make sure bogomips is set to some value
- $cpuinfo->{bogomips} |= DEFAULT_BOGO_MIPS;
+ $cpuinfo->{bogomips} ||= DEFAULT_BOGO_MIPS;
# Cpus reported once, but with 'cpu_count' set to the actual number
my $cpu_count= $cpuinfo->{cpu_count} || 1;
diff --git a/mysql-test/lib/v1/mysql-test-run.pl b/mysql-test/lib/v1/mysql-test-run.pl
index 4e1625db093..d63583b1634 100755
--- a/mysql-test/lib/v1/mysql-test-run.pl
+++ b/mysql-test/lib/v1/mysql-test-run.pl
@@ -1,7 +1,7 @@
#!/usr/bin/perl
# -*- cperl -*-
-# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2013, 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
@@ -133,7 +133,6 @@ our $path_timefile;
our $path_snapshot;
our $path_mysqltest_log;
our $path_current_test_log;
-our $path_my_basedir;
our $opt_vardir; # A path but set directly on cmd line
our $path_vardir_trace; # unix formatted opt_vardir for trace files
@@ -779,8 +778,6 @@ sub command_line_setup () {
$glob_mysql_bench_dir= undef
unless -d $glob_mysql_bench_dir;
- $path_my_basedir=
- $source_dist ? $glob_mysql_test_dir : $glob_basedir;
$glob_timers= mtr_init_timers();
@@ -3171,7 +3168,7 @@ sub install_db ($$) {
mtr_init_args(\$args);
mtr_add_arg($args, "--no-defaults");
mtr_add_arg($args, "--bootstrap");
- mtr_add_arg($args, "--basedir=%s", $path_my_basedir);
+ mtr_add_arg($args, "--basedir=%s", $glob_basedir);
mtr_add_arg($args, "--datadir=%s", $data_dir);
mtr_add_arg($args, "--loose-skip-ndbcluster");
mtr_add_arg($args, "--loose-skip-aria");
@@ -3333,7 +3330,7 @@ log = $instance->{path_datadir}/mysqld$server_id.log
log-error = $instance->{path_datadir}/mysqld$server_id.err.log
log-slow-queries = $instance->{path_datadir}/mysqld$server_id.slow.log
character-sets-dir = $path_charsetsdir
-basedir = $path_my_basedir
+basedir = $glob_basedir
server_id = $server_id
shutdown-delay = 10
skip-stack-trace
@@ -3942,7 +3939,7 @@ sub mysqld_arguments ($$$$) {
mtr_add_arg($args, "%s--no-defaults", $prefix);
- mtr_add_arg($args, "%s--basedir=%s", $prefix, $path_my_basedir);
+ mtr_add_arg($args, "%s--basedir=%s", $prefix, $glob_basedir);
mtr_add_arg($args, "%s--character-sets-dir=%s", $prefix, $path_charsetsdir);
if ( $mysql_version_id >= 50036)