1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

MDEV-5096 - Wrong error message on attempt to kill somebody else's query ID

Attempting to kill query owned by different user now returns better error:
"You are not owner of query N" instead of "You are not owner of thread N".
This commit is contained in:
Sergey Vojtovich
2015-02-09 13:41:24 +04:00
parent d517886482
commit 35a019837e
4 changed files with 44 additions and 1 deletions

View File

@@ -8038,7 +8038,8 @@ kill_one_thread(THD *thd, longlong id, killed_state kill_signal, killed_type typ
error=0;
}
else
error=ER_KILL_DENIED_ERROR;
error= (type == KILL_TYPE_QUERY ? ER_KILL_QUERY_DENIED_ERROR :
ER_KILL_DENIED_ERROR);
mysql_mutex_unlock(&tmp->LOCK_thd_data);
}
DBUG_PRINT("exit", ("%d", error));