mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-24985 Shutdown fails to abort current InnoDB lock waits
On shutdown, to kill remaining connections, do the same thing that server does during KILL CONNECTION, i.e thd->awake(). The stripped-down KILL version, that was used prior to this patch for shutdown, missed the engine specific part (ha_kill_query)
This commit is contained in:
@ -1869,7 +1869,7 @@ void add_diff_to_status(STATUS_VAR *to_var, STATUS_VAR *from_var,
|
||||
@note Do always call this while holding LOCK_thd_kill.
|
||||
NOT_KILLED is used to awake a thread for a slave
|
||||
*/
|
||||
|
||||
extern std::atomic<my_thread_id> shutdown_thread_id;
|
||||
void THD::awake_no_mutex(killed_state state_to_set)
|
||||
{
|
||||
DBUG_ENTER("THD::awake");
|
||||
@ -1893,7 +1893,7 @@ void THD::awake_no_mutex(killed_state state_to_set)
|
||||
if (state_to_set >= KILL_CONNECTION || state_to_set == NOT_KILLED)
|
||||
{
|
||||
#ifdef SIGNAL_WITH_VIO_CLOSE
|
||||
if (this != current_thd)
|
||||
if (this != current_thd && thread_id != shutdown_thread_id)
|
||||
{
|
||||
if(active_vio)
|
||||
vio_shutdown(active_vio, SHUT_RDWR);
|
||||
|
Reference in New Issue
Block a user