From d500c22f6de8cba624d4e77cb9dfd815edb76e8c Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 20 May 2024 23:11:29 +0200 Subject: [PATCH] remove double-printing of safemalloc report and rephrase memory accounting error message to match tmp_space one (besides, memory accounting error could - and did - happen when all memory was actually freed) --- sql/mysqld.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 76920bd57a3..d4927c45c51 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1939,12 +1939,8 @@ static void mysqld_exit(int exit_code) #endif set_malloc_size_cb(NULL); if (global_status_var.global_memory_used) - { - fprintf(stderr, "Warning: Memory not freed: %lld\n", + fprintf(stderr, "Warning: Internal memory accounting error of %lld bytes\n", (longlong) global_status_var.global_memory_used); - if (exit_code == 0 || opt_endinfo) - SAFEMALLOC_REPORT_MEMORY(0); - } if (global_tmp_space_used) fprintf(stderr, "Warning: Internal tmp_space accounting error of %lld " "bytes\n",