summaryrefslogtreecommitdiff
path: root/mysql-test/main/grant_kill.result
blob: 39a7e8fd5cb309b9513e85266fbe8813d829f3c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#
# Start of 10.5 tests
#
#
# MDEV-21743 Split up SUPER privilege to smaller privileges 
#
#
# Test that KILL is not allowed without CONNECTION ADMIN
#
CREATE USER foo@localhost;
GRANT SELECT ON *.* TO foo@localhost;
CREATE USER bar@localhost;
GRANT ALL PRIVILEGES ON *.* TO bar@localhost;
REVOKE CONNECTION ADMIN ON *.* FROM bar@localhost;
connect  foo,localhost,foo,,;
connect  bar,localhost,bar,,;
SELECT user FROM information_schema.processlist ORDER BY user;
user
bar
foo
root
KILL ID;
ERROR HY000: You are not owner of thread ID
disconnect foo;
disconnect bar;
connection default;
DROP USER foo@localhost;
DROP USER bar@localhost;
#
# Test that KILL is allowed with CONNECTION ADMIN
#
CREATE USER foo@localhost;
GRANT SELECT ON *.* TO foo@localhost;
CREATE USER bar@localhost;
GRANT PROCESS, CONNECTION ADMIN ON *.* TO bar@localhost;
connect  foo,localhost,foo,,;
connect  bar,localhost,bar,,;
SELECT user FROM information_schema.processlist ORDER BY user;
user
bar
foo
root
KILL ID;
connection default;
disconnect foo;
disconnect bar;
DROP USER foo@localhost;
DROP USER bar@localhost;
#
# End of 10.5 tests
#