diff options
author | Vladislav Vaintroub <wlad@montyprogram.com> | 2012-11-27 00:45:29 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@montyprogram.com> | 2012-11-27 00:45:29 +0100 |
commit | 0f8450b2fb0f3f21a1829254b19bd61c46d09ead (patch) | |
tree | b367876fb76aa2f780f1885cddeaf78473d7943f /sql | |
parent | 980664bf2378d2bb57ec2f34016f0ff0a7ff4818 (diff) | |
download | mariadb-git-0f8450b2fb0f3f21a1829254b19bd61c46d09ead.tar.gz |
MDEV-3885 - connection suicide via mysql_kill() causes assertion in server
Assertion happened because sql_kill did not set OK status in diagnostic area
in the case of connection suicide (id to kill == thd->thread_id), issued
via COM_PROCESS_KILL , e.g using mysql_kill()
This patch ensures that diagnostic area is initialized in this specific case.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_parse.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index d2eb6ae8d1f..087c7903dc7 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -6717,7 +6717,7 @@ void sql_kill(THD *thd, ulong id, killed_state state) uint error; if (!(error= kill_one_thread(thd, id, state))) { - if (! thd->killed) + if ((!thd->killed) || (thd->thread_id == id)) my_ok(thd); } else |