diff --git a/mysql-test/lib/My/SafeProcess/Base.pm b/mysql-test/lib/My/SafeProcess/Base.pm index 1cd01cb0ca9..91ebdc8fe11 100644 --- a/mysql-test/lib/My/SafeProcess/Base.pm +++ b/mysql-test/lib/My/SafeProcess/Base.pm @@ -114,6 +114,10 @@ sub create_process { lock($win32_spawn_lock); + # STDOUT/STDERR are temporarily reassigned, avoid prevent + # output from another thread + lock($mtr_report::flush_lock); + #printf STDERR "stdin %d, stdout %d, stderr %d\n", # fileno STDIN, fileno STDOUT, fileno STDERR; diff --git a/mysql-test/lib/mtr_report.pm b/mysql-test/lib/mtr_report.pm index 0c3c45f3b18..308dbb77a3e 100644 --- a/mysql-test/lib/mtr_report.pm +++ b/mysql-test/lib/mtr_report.pm @@ -88,7 +88,7 @@ sub flush_out { } use if $^O eq "MSWin32", "threads::shared"; -my $flush_lock :shared; +our $flush_lock :shared; # Print to stdout sub print_out {