1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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.
This commit is contained in:
Vladislav Vaintroub
2012-11-27 00:45:29 +01:00
parent 980664bf23
commit 0f8450b2fb
2 changed files with 18 additions and 1 deletions

View File

@ -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