Commit 2cc7e72a authored by Magnus Svensson's avatar Magnus Svensson

WL#4189 mtr.pl v2

 - Suppress intentional safemalloc dump warnings
 - add fflush(stdout) to make sure that the "End safemalloc memory dump." marker is flushed.
parent ee156bf0
...@@ -236,6 +236,17 @@ BEGIN ...@@ -236,6 +236,17 @@ BEGIN
SET suspicious=0 SET suspicious=0
WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; WHERE el.suspicious=1 AND el.line REGEXP ts.pattern;
--
-- Suppress intentional safemalloc dump warnings
-- i.e inside "Begin/End safemalloc memeory dump" block
--
SELECT @min_row:=row
FROM error_log WHERE line = "Begin safemalloc memory dump:";
SELECT @max_row:=row
FROM error_log WHERE line = "End safemalloc memory dump.";
UPDATE error_log SET suspicious=0
WHERE suspicious=1 AND row > @min_row AND row < @max_row;
-- --
-- Get the number of marked lines and return result -- Get the number of marked lines and return result
-- --
......
...@@ -513,7 +513,7 @@ Next alarm time: %lu\n", ...@@ -513,7 +513,7 @@ Next alarm time: %lu\n",
fprintf(stdout,"\nBegin safemalloc memory dump:\n"); // tag needed for test suite fprintf(stdout,"\nBegin safemalloc memory dump:\n"); // tag needed for test suite
TERMINATE(stdout, 1); // Write malloc information TERMINATE(stdout, 1); // Write malloc information
fprintf(stdout,"\nEnd safemalloc memory dump.\n"); fprintf(stdout,"\nEnd safemalloc memory dump.\n");
fflush(stdout);
#ifdef HAVE_MALLINFO #ifdef HAVE_MALLINFO
struct mallinfo info= mallinfo(); struct mallinfo info= mallinfo();
printf("\nMemory status:\n\ printf("\nMemory status:\n\
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment