Commit 942a5a89 authored by Monty's avatar Monty Committed by Sergei Golubchik

Report memory leaks from mariadbd if -T or --debug is used

Before memory leaks was only reported if server stopped normally.
This made it harder to find out where the leaks happened when
debugging test cases.
parent 36cdd5c3
...@@ -1863,7 +1863,7 @@ static void mysqld_exit(int exit_code) ...@@ -1863,7 +1863,7 @@ static void mysqld_exit(int exit_code)
{ {
fprintf(stderr, "Warning: Memory not freed: %lld\n", fprintf(stderr, "Warning: Memory not freed: %lld\n",
(longlong) global_status_var.global_memory_used); (longlong) global_status_var.global_memory_used);
if (exit_code == 0) if (exit_code == 0 || opt_endinfo)
SAFEMALLOC_REPORT_MEMORY(0); SAFEMALLOC_REPORT_MEMORY(0);
} }
DBUG_LEAVE; DBUG_LEAVE;
......
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