summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2018-05-24 16:20:31 +0300
committerVicențiu Ciorbaru <vicentiu@mariadb.org>2018-05-24 18:59:17 +0300
commit7a4f81b4c0d78e51c7b260b6f84e2732fbb99192 (patch)
tree594928c3d14aab3ea1e0a57d2b6cc3c7cd9367ff
parent494c981d232678a3ba73abbe1502ddb0f95efcdc (diff)
downloadmariadb-git-bb-10.2-monty-fixed.tar.gz
Extend debug_assert_on_not_freed_memorybb-10.2-monty-fixed
Don't check global_memory_used if debug_assert_on_not_freed_memory is not set
-rw-r--r--sql/mysqld.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 99cad2c0423..8dd178108b9 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -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);
}