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

MDEV-4911 - add KILL query id, and add query id information to processlist

- issue proper error message if query id is not found
- do not allow kill query id 0
- fixed ps-protocol and embedded tests
This commit is contained in:
Sergey Vojtovich
2013-09-16 18:14:46 +04:00
parent 1a2a9d74fe
commit d4f83cc40c
7 changed files with 120 additions and 106 deletions

View File

@ -6854,11 +6854,11 @@ uint
kill_one_thread(THD *thd, longlong id, killed_state kill_signal, killed_type type)
{
THD *tmp;
uint error=ER_NO_SUCH_THREAD;
uint error= (type == KILL_TYPE_QUERY ? ER_NO_SUCH_QUERY : ER_NO_SUCH_THREAD);
DBUG_ENTER("kill_one_thread");
DBUG_PRINT("enter", ("id: %lld signal: %u", id, (uint) kill_signal));
if ((tmp= find_thread_by_id(id, type == KILL_TYPE_QUERY)))
if (id && (tmp= find_thread_by_id(id, type == KILL_TYPE_QUERY)))
{
/*
If we're SUPER, we can KILL anything, including system-threads.