Commit 7a4f81b4 authored by Monty's avatar Monty Committed by Vicențiu Ciorbaru

Extend debug_assert_on_not_freed_memory

Don't check global_memory_used if
debug_assert_on_not_freed_memory is not set
parent 494c981d
...@@ -2169,7 +2169,8 @@ static void mysqld_exit(int exit_code) ...@@ -2169,7 +2169,8 @@ static void mysqld_exit(int exit_code)
if (opt_endinfo && global_status_var.global_memory_used) if (opt_endinfo && global_status_var.global_memory_used)
fprintf(stderr, "Warning: Memory not freed: %ld\n", fprintf(stderr, "Warning: Memory not freed: %ld\n",
(long) global_status_var.global_memory_used); (long) global_status_var.global_memory_used);
if (!opt_debugging && !my_disable_leak_check && exit_code == 0) if (!opt_debugging && !my_disable_leak_check && exit_code == 0 &&
debug_assert_on_not_freed_memory)
{ {
DBUG_ASSERT(global_status_var.global_memory_used == 0); DBUG_ASSERT(global_status_var.global_memory_used == 0);
} }
......
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