summaryrefslogtreecommitdiff
path: root/mysql-test/mysql-test-run.pl
diff options
context:
space:
mode:
authorBjorn Munch <Bjorn.Munch@sun.com>2009-03-02 13:48:35 +0100
committerBjorn Munch <Bjorn.Munch@sun.com>2009-03-02 13:48:35 +0100
commit6293a2ea9306449afc1b00eaa8f1b0a1833ed8cc (patch)
tree2e9caa122531cc5ac0e22a80e4e05623c69cfae5 /mysql-test/mysql-test-run.pl
parent090085164629b203d570bc1fe05294ae2a1c5a5f (diff)
downloadmariadb-git-6293a2ea9306449afc1b00eaa8f1b0a1833ed8cc.tar.gz
Bug #40978 Error log gets truncated during testsuite, prevents debugging
Error log gets truncated when mysqld is restarted by MTR mysql-test/include/check-warnings.test: Since server doesn't have log-error, get it from env. var. set by MTR mysql-test/lib/My/ConfigFactory.pm: "Hide" log-error in a comment mysql-test/mysql-test-run.pl: "Hide" log-error in my.cnf by comment add --console to arguments on Windows Move .err file to var/log
Diffstat (limited to 'mysql-test/mysql-test-run.pl')
-rwxr-xr-xmysql-test/mysql-test-run.pl19
1 files changed, 14 insertions, 5 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 5e85cfe5cac..a254180056b 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -3470,7 +3470,10 @@ sub start_check_warnings ($$) {
my $name= "warnings-".$mysqld->name();
- extract_warning_lines($mysqld->value('log-error'));
+ my $log_error= $mysqld->value('#log-error');
+ # To be communicated to the test
+ $ENV{MTR_LOG_ERROR}= $log_error;
+ extract_warning_lines($log_error);
my $args;
mtr_init_args(\$args);
@@ -3986,6 +3989,12 @@ sub mysqld_start ($$) {
$path_vardir_trace, $mysqld->name());
}
+ if (IS_WINDOWS)
+ {
+ # Trick the server to send output to stderr, with --console
+ mtr_add_arg($args, "--console");
+ }
+
if ( $opt_gdb || $opt_manual_gdb )
{
gdb_arguments(\$args, \$exe, $mysqld->name());
@@ -4018,7 +4027,7 @@ sub mysqld_start ($$) {
# Remove the old pidfile if any
unlink($mysqld->value('pid-file'));
- my $output= $mysqld->value('log-error');
+ my $output= $mysqld->value('#log-error');
if ( $opt_valgrind and $opt_debug )
{
# When both --valgrind and --debug is selected, send
@@ -4319,7 +4328,7 @@ sub start_servers($) {
# Already started
# Write start of testcase to log file
- mark_log($mysqld->value('log-error'), $tinfo);
+ mark_log($mysqld->value('#log-error'), $tinfo);
next;
}
@@ -4378,7 +4387,7 @@ sub start_servers($) {
mkpath($tmpdir) unless -d $tmpdir;
# Write start of testcase to log file
- mark_log($mysqld->value('log-error'), $tinfo);
+ mark_log($mysqld->value('#log-error'), $tinfo);
# Run <tname>-master.sh
if ($mysqld->option('#!run-master-sh') and
@@ -4429,7 +4438,7 @@ sub start_servers($) {
$tinfo->{comment}=
"Failed to start ".$mysqld->name();
- my $logfile= $mysqld->value('log-error');
+ my $logfile= $mysqld->value('#log-error');
if ( defined $logfile and -f $logfile )
{
$tinfo->{logfile}= mtr_fromfile($logfile);