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:
@ -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.
|
||||
|
Reference in New Issue
Block a user