MDEV-10098 main.create_delayed fails with ps-protocol: assertion `global_status_var.global_memory_used >= 0' failed
Remove the assert. We cannot verify that global_memory_used value is valid (>=0) because some of updates are cached in individual THD's (e.g. THD1 can have +300 cached, while the other THD2 can have -300 cached. If the second THD exists before the first one, global_memory_used will be -300 temporarily). Instead add the assert just before the exit, when all THDs been already destroyed.
This commit is contained in:
parent
e65703c6bd
commit
9f9eb682d5
@ -2141,6 +2141,7 @@ static void mysqld_exit(int exit_code)
|
||||
shutdown_performance_schema(); // we do it as late as possible
|
||||
#endif
|
||||
set_malloc_size_cb(NULL);
|
||||
DBUG_ASSERT(global_status_var.global_memory_used == 0);
|
||||
cleanup_tls();
|
||||
DBUG_LEAVE;
|
||||
if (opt_endinfo && global_status_var.global_memory_used)
|
||||
@ -4109,14 +4110,6 @@ static void my_malloc_size_cb_func(long long size, my_bool is_thread_specific)
|
||||
else
|
||||
{
|
||||
update_global_memory_status(size);
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
/*
|
||||
Check if we have missed some mallocs. THis can't be done for embedded
|
||||
server as the main code may have done calls to malloc before starting
|
||||
the embedded library.
|
||||
*/
|
||||
DBUG_ASSERT(global_status_var.global_memory_used >= 0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user