diff options
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r-- | sql/sql_class.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h index 7570211f586..cf90f78ea30 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -3336,8 +3336,15 @@ public: void abort_current_cond_wait(bool force); /** Disconnect the associated communication endpoint. */ - void disconnect(); - + inline void disconnect() + { + mysql_mutex_lock(&LOCK_thd_kill); + mysql_mutex_lock(&LOCK_thd_data); + disconnect_mutexed(); + mysql_mutex_unlock(&LOCK_thd_kill); + mysql_mutex_unlock(&LOCK_thd_data); + } + void disconnect_mutexed(); /* Allows this thread to serve as a target for others to schedule Async |