mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +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:
@@ -2161,15 +2161,15 @@ static void mysqld_exit(int exit_code)
|
|||||||
shutdown_performance_schema(); // we do it as late as possible
|
shutdown_performance_schema(); // we do it as late as possible
|
||||||
#endif
|
#endif
|
||||||
set_malloc_size_cb(NULL);
|
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);
|
DBUG_ASSERT(global_status_var.global_memory_used == 0);
|
||||||
}
|
}
|
||||||
cleanup_tls();
|
cleanup_tls();
|
||||||
DBUG_LEAVE;
|
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");
|
sd_notify(0, "STATUS=MariaDB server is down");
|
||||||
exit(exit_code); /* purecov: inspected */
|
exit(exit_code); /* purecov: inspected */
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user