From 5c398486b2f22c44c2658d4b075aba0cc1e47dbb Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 24 May 2007 13:11:45 +0200 Subject: Bug#28644 Memory status report confused with memory leak This patch removes a false memory leak error report from the test suite. There is a test case that puposely provokes a SAFEMALLOC leak report, even though there is no actual leak. mysql-test/lib/mtr_report.pl: 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. sql/sql_test.cc: Added tags to surround memory dump status report to help the test suite to determine that this isn't a memory leak --- mysql-test/lib/mtr_report.pl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'mysql-test/lib') diff --git a/mysql-test/lib/mtr_report.pl b/mysql-test/lib/mtr_report.pl index a2c16e1941a..cd24610f9c0 100644 --- a/mysql-test/lib/mtr_report.pl +++ b/mysql-test/lib/mtr_report.pl @@ -261,8 +261,19 @@ sub mtr_report_stats ($) { mtr_warning("can't read $errlog"); next; } + my $leak_reports_expected= undef; while ( ) { + # 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 @@ -273,6 +284,9 @@ sub mtr_report_stats ($) { } if ( /$pattern/ ) { + if ($leak_reports_expected) { + next; + } $found_problems= 1; print WARN $_; } -- cgit v1.2.1