From 5fddd4a7f09c7cb7ae2171f284130b1316aa6235 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Tue, 27 Nov 2012 15:47:08 +0100 Subject: Fix yet another regression after MDEV-3885. If connection kills itself (or own query), it will get an error consistently, with both COM_PROCESSKILL and with "KILL [QUERY] id" --- sql/sql_parse.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sql/sql_parse.cc') diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index acd4873b212..5dac052b749 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -6717,8 +6717,10 @@ void sql_kill(THD *thd, ulong id, killed_state state) uint error; if (!(error= kill_one_thread(thd, id, state))) { - if ((!thd->killed) || (thd->thread_id == id && thd->killed >= KILL_CONNECTION)) + if ((!thd->killed)) my_ok(thd); + else + my_error(killed_errno(thd->killed), MYF(0), id); } else my_error(error, MYF(0), id); -- cgit v1.2.1