summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index ea07bfce0cb..7bbcff4bc2b 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -6471,8 +6471,14 @@ uint kill_one_thread(THD *thd, ulong id, bool only_kill_query)
if ((thd->security_ctx->master_access & SUPER_ACL) ||
thd->security_ctx->user_matches(tmp->security_ctx))
{
- tmp->awake(only_kill_query ? THD::KILL_QUERY : THD::KILL_CONNECTION);
- error=0;
+ /* process the kill only if thread is not already undergoing any kill
+ connection.
+ */
+ if (tmp->killed != THD::KILL_CONNECTION)
+ {
+ tmp->awake(only_kill_query ? THD::KILL_QUERY : THD::KILL_CONNECTION);
+ }
+ error= 0;
}
else
error=ER_KILL_DENIED_ERROR;