diff options
-rw-r--r-- | mysql-test/lib/mtr_report.pl | 14 | ||||
-rw-r--r-- | sql/sql_test.cc | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/lib/mtr_report.pl b/mysql-test/lib/mtr_report.pl index ce206a35727..d3b38573ae2 100644 --- a/mysql-test/lib/mtr_report.pl +++ b/mysql-test/lib/mtr_report.pl @@ -278,8 +278,19 @@ sub mtr_report_stats ($) { mtr_warning("can't read $errlog"); next; } + my $leak_reports_expected= undef; while ( <ERR> ) { + # There is a test case that purposely provokes a + # SAFEMALLOC leak report, even though there is no actual + # leak. We need to detect this, and ignore the warning in + # that case. + if (/Begin safemalloc memory dump:/) { + $leak_reports_expected= 1; + } elsif (/End safemalloc memory dump./) { + $leak_reports_expected= undef; + } + # Skip some non fatal warnings from the log files if ( /Warning:\s+Table:.* on (delete|rename)/ or /Warning:\s+Setting lower_case_table_names=2/ or @@ -290,6 +301,9 @@ sub mtr_report_stats ($) { } if ( /$pattern/ ) { + if ($leak_reports_expected) { + next; + } $found_problems= 1; print WARN $_; } diff --git a/sql/sql_test.cc b/sql/sql_test.cc index d7573b42c5f..86744fb1bf5 100644 --- a/sql/sql_test.cc +++ b/sql/sql_test.cc @@ -508,7 +508,9 @@ Next alarm time: %lu\n", display_table_locks(); fflush(stdout); my_checkmalloc(); + fprintf(stdout,"\nBegin safemalloc memory dump:\n"); // tag needed for test suite TERMINATE(stdout); // Write malloc information + fprintf(stdout,"\nEnd safemalloc memory dump.\n"); #ifdef HAVE_MALLINFO struct mallinfo info= mallinfo(); |