mirror of
https://github.com/MariaDB/server.git
synced 2025-05-28 13:01:41 +03:00
Write error message ebfore aborting if not all memory is released
Also don't abort if global_status_var.global_memory_used != 0 on not normal exit as then it's likely that not all memory is released.
This commit is contained in:
parent
157f2b2551
commit
bd20fb87ec
@ -2161,15 +2161,15 @@ static void mysqld_exit(int exit_code)
|
||||
shutdown_performance_schema(); // we do it as late as possible
|
||||
#endif
|
||||
set_malloc_size_cb(NULL);
|
||||
if (!opt_debugging && !my_disable_leak_check)
|
||||
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)
|
||||
{
|
||||
DBUG_ASSERT(global_status_var.global_memory_used == 0);
|
||||
}
|
||||
cleanup_tls();
|
||||
DBUG_LEAVE;
|
||||
if (opt_endinfo && global_status_var.global_memory_used)
|
||||
fprintf(stderr, "Warning: Memory not freed: %ld\n",
|
||||
(long) global_status_var.global_memory_used);
|
||||
sd_notify(0, "STATUS=MariaDB server is down");
|
||||
exit(exit_code); /* purecov: inspected */
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user