mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-29368 Assertion `trx->mysql_thd == thd' failed in innobase_kill_query from process_timers/timer_handler and use-after-poison in innobase_kill_query
This is a 10.5 version of 9b750dcbd8
, fix for
MDEV-23536 Race condition between KILL and transaction commit
InnoDB needs to remove trx from thd before destroying it (trx), otherwise
a concurrent KILL might get a pointer from thd to a destroyed trx.
ha_close_connection() should allow engines to clear ha_data in
hton->on close_connection(). To prevent the engine from being unloaded
while hton->close_connection() is running, we remove the lock from
ha_data and unlock the plugin manually.
This commit is contained in:
@ -1533,6 +1533,8 @@ void THD::cleanup(void)
|
||||
wsrep_client_thread= false;
|
||||
#endif /* WITH_WSREP */
|
||||
|
||||
DEBUG_SYNC(this, "THD_cleanup_after_set_killed");
|
||||
|
||||
mysql_ha_cleanup(this);
|
||||
locked_tables_list.unlock_locked_tables(this);
|
||||
|
||||
|
Reference in New Issue
Block a user