diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2021-02-16 14:56:59 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2021-02-16 14:56:59 +0100 |
commit | e0072fadcb00edae74e748aee3148075b9cddae2 (patch) | |
tree | 625d5c0869cfbb322a2b4cdaab453e17fd5d31bf /sql/sql_class.h | |
parent | 1146e98b3af3e2b15df0598a860f4571663a98d0 (diff) | |
parent | ae7989ca2059869f81c837509e5ff554f7f63562 (diff) | |
download | mariadb-git-10.6-halfmerge.tar.gz |
Merge branch 'bb-10.5-release' into bb-10.6-release10.6-halfmerge
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r-- | sql/sql_class.h | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h index 5612ed5a790..2ab1d530e13 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -2579,7 +2579,7 @@ public: - mysys_var (used by KILL statement and shutdown). - Also ensures that THD is not deleted while mutex is hold */ - mysql_mutex_t LOCK_thd_kill; + mutable mysql_mutex_t LOCK_thd_kill; /* all prepared statements and cursors of this connection */ Statement_map stmt_map; @@ -3622,7 +3622,7 @@ public: void update_all_stats(); void update_stats(void); void change_user(void); - void cleanup(bool have_mutex=false); + void cleanup(void); void cleanup_after_query(); void free_connection(); void reset_for_reuse(); @@ -3650,19 +3650,13 @@ public: void awake_no_mutex(killed_state state_to_set); void awake(killed_state state_to_set) { - bool wsrep_on_local= variables.wsrep_on; - /* - mutex locking order (LOCK_thd_data - LOCK_thd_kill)) requires - to grab LOCK_thd_data here - */ - if (wsrep_on_local) - mysql_mutex_lock(&LOCK_thd_data); mysql_mutex_lock(&LOCK_thd_kill); + mysql_mutex_lock(&LOCK_thd_data); awake_no_mutex(state_to_set); + mysql_mutex_unlock(&LOCK_thd_data); mysql_mutex_unlock(&LOCK_thd_kill); - if (wsrep_on_local) - mysql_mutex_unlock(&LOCK_thd_data); } + void abort_current_cond_wait(bool force); /** Disconnect the associated communication endpoint. */ void disconnect(); @@ -4418,8 +4412,7 @@ public: mysql_mutex_lock(&LOCK_thd_kill); int err= killed_errno(); if (err) - my_message(err, killed_err ? killed_err->msg : ER_THD(this, err), - MYF(0)); + my_message(err, killed_err ? killed_err->msg : ER_THD(this, err), MYF(0)); mysql_mutex_unlock(&LOCK_thd_kill); } /* return TRUE if we will abort query if we make a warning now */ |