mirror of
https://github.com/MariaDB/server.git
synced 2026-04-26 18:25:30 +02:00
MDEV-7938 MariaDB Crashes Suddenly while writing binlogs
on disconnect THD must clean user_var_events array before dropping temporary tables. Otherwise when binlogging a DROP, it'll access user_var_events, but they were allocated in the already freed memroot.
This commit is contained in:
parent
053143efe1
commit
e26b2071be
3 changed files with 26 additions and 1 deletions
|
|
@ -1394,6 +1394,7 @@ void THD::cleanup(void)
|
|||
mysql_ha_cleanup(this);
|
||||
locked_tables_list.unlock_locked_tables(this);
|
||||
|
||||
delete_dynamic(&user_var_events);
|
||||
close_temporary_tables(this);
|
||||
|
||||
transaction.xid_state.xa_state= XA_NOTR;
|
||||
|
|
@ -1427,7 +1428,6 @@ void THD::cleanup(void)
|
|||
debug_sync_end_thread(this);
|
||||
#endif /* defined(ENABLED_DEBUG_SYNC) */
|
||||
|
||||
delete_dynamic(&user_var_events);
|
||||
my_hash_free(&user_vars);
|
||||
sp_cache_clear(&sp_proc_cache);
|
||||
sp_cache_clear(&sp_func_cache);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue