Extend debug_assert_on_not_freed_memory

Don't check global_memory_used if
debug_assert_on_not_freed_memory is not set
This commit is contained in:
Monty 2018-05-24 16:20:31 +03:00 committed by Vicențiu Ciorbaru
commit 7a4f81b4c0

View file

@ -2169,7 +2169,8 @@ static void mysqld_exit(int exit_code)
if (opt_endinfo && global_status_var.global_memory_used)
fprintf(stderr, "Warning: Memory not freed: %ld\n",
(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);
}