summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorBjorn Munch <bjorn.munch@oracle.com>2011-04-18 11:47:14 +0200
committerBjorn Munch <bjorn.munch@oracle.com>2011-04-18 11:47:14 +0200
commita24b1cd836f0f5951fff0f1a3d5fcb9c33801bf0 (patch)
treef8949325b362628a0452ae045e201943eaa09d6a /mysql-test
parent73e6042cb4a6f3a71e0bcb31e6f84ac4abec6e86 (diff)
downloadmariadb-git-a24b1cd836f0f5951fff0f1a3d5fcb9c33801bf0.tar.gz
Bug #12365486 MTR FAILS TO FIND WARNINGS IN SERVER LOG WITH --VALGRIND COMBINED WITH --DEBUG
With this combination, outoput was directed to .trace but not all parts of MTR was aware of this. Replace .err with .trace at the earliest possible place
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/lib/My/ConfigFactory.pm8
-rwxr-xr-xmysql-test/mysql-test-run.pl9
2 files changed, 7 insertions, 10 deletions
diff --git a/mysql-test/lib/My/ConfigFactory.pm b/mysql-test/lib/My/ConfigFactory.pm
index bb990a9f8d2..7688283fdc1 100644
--- a/mysql-test/lib/My/ConfigFactory.pm
+++ b/mysql-test/lib/My/ConfigFactory.pm
@@ -1,5 +1,5 @@
# -*- cperl -*-
-# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 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 Library General Public
@@ -141,7 +141,11 @@ sub fix_tmpdir {
sub fix_log_error {
my ($self, $config, $group_name, $group)= @_;
my $dir= $self->{ARGS}->{vardir};
- return "$dir/log/$group_name.err";
+ if ( $::opt_valgrind and $::opt_debug ) {
+ return "$dir/log/$group_name.trace";
+ } else {
+ return "$dir/log/$group_name.err";
+ }
}
sub fix_log {
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 2897ae3142a..1c7efccc69d 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -256,7 +256,7 @@ my $opt_strace_client;
our $opt_user = "root";
-my $opt_valgrind= 0;
+our $opt_valgrind= 0;
my $opt_valgrind_mysqld= 0;
my $opt_valgrind_mysqltest= 0;
my @default_valgrind_args= ("--show-reachable=yes");
@@ -4544,13 +4544,6 @@ sub mysqld_start ($$) {
unlink($mysqld->value('pid-file'));
my $output= $mysqld->value('#log-error');
- if ( $opt_valgrind and $opt_debug )
- {
- # When both --valgrind and --debug is selected, send
- # all output to the trace file, making it possible to
- # see the exact location where valgrind complains
- $output= "$opt_vardir/log/".$mysqld->name().".trace";
- }
# Remember this log file for valgrind error report search
$mysqld_logs{$output}= 1 if $opt_valgrind;
# Remember data dir for gmon.out files if using gprof