summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2015-02-09 13:41:24 +0400
committerSergey Vojtovich <svoj@mariadb.org>2015-07-24 20:59:50 +0400
commit35a019837e0290af45962484b4ddc1d6a92ac654 (patch)
treede1f3ad06643951ea85d9e336630c8bd5f341d4b /mysql-test/t
parentd517886482158f7f4525b55b7899ad6bab882768 (diff)
downloadmariadb-git-35a019837e0290af45962484b4ddc1d6a92ac654.tar.gz
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".
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/kill.test26
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/t/kill.test b/mysql-test/t/kill.test
index 6e97f3bbc33..b762900f1ec 100644
--- a/mysql-test/t/kill.test
+++ b/mysql-test/t/kill.test
@@ -647,5 +647,31 @@ reap;
--error ER_NO_SUCH_QUERY
KILL QUERY ID 0;
+--echo #
+--echo # MDEV-5096 - Wrong error message on attempt to kill somebody else's
+--echo # query ID
+--echo #
+CREATE USER u1@localhost;
+send SELECT SLEEP(1000);
+
+connection con1;
+let $wait_condition= SELECT @id:=QUERY_ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO='SELECT SLEEP(1000)';
+source include/wait_condition.inc;
+let $id= `SELECT @id`;
+
+connect(con5, localhost, u1,,);
+--replace_result $id ID
+--error ER_KILL_QUERY_DENIED_ERROR
+eval KILL QUERY ID $id;
+
+connection con1;
+KILL QUERY ID @id;
+
+connection default;
+reap;
+disconnect con5;
+DROP USER u1@localhost;
+
+
SET DEBUG_SYNC = 'RESET';
DROP FUNCTION MY_KILL;