1
create database authz_no;
2
SELECT * from authz_no.dont_exist;
3
ERROR 42S02: Table 'authz_no.dont_exist' doesn't exist
4
create database authz_yes;
20
SELECT * from authz_no.dont_exist;
21
ERROR 42000: Access denied for user 'authz'@'LOCALHOST' to database 'authz_no'
22
create database authz_no;
23
ERROR 42000: Access denied for user 'authz'@'LOCALHOST' to database 'authz_no'
24
drop database authz_no;
25
ERROR 42000: Access denied for user 'authz'@'LOCALHOST' to database 'authz_no'
27
ID USER HOST DB COMMAND TIME STATE INFO
30
3 root # test # # # show processlist
31
4 root # test # # # show processlist
32
create table t1 (kill_id int);
33
insert into t1 values(connection_id());
34
select ((@id := kill_id) - kill_id) from t1;
35
((@id := kill_id) - kill_id)
38
select ((@id := kill_id) - kill_id) from t1;
39
((@id := kill_id) - kill_id)
41
select @id != connection_id();
42
@id != connection_id()
44
update t1 set kill_id= connection_id();
46
ID USER HOST DB COMMAND TIME STATE INFO
47
2 authz # test Query # Sending data show processlist
48
select ((@id := kill_id) - kill_id) from t1;
49
((@id := kill_id) - kill_id)
52
ERROR HY000: Unknown thread id: 5
12
create table t1 (kill_id int);
13
insert into t1 values(connection_id());
14
SELECT * from user1.dont_exist;
15
ERROR 42S02: Table 'user1.dont_exist' doesn't exist
21
SELECT * from user2.dont_exist;
22
ERROR 42000: Access denied for user 'user1'@'LOCALHOST' to database 'user2'
23
create database authorize_fail;
24
ERROR 42000: Access denied for user 'user1'@'LOCALHOST' to database 'authorize_fail'
26
ERROR 42000: Access denied for user 'user1'@'LOCALHOST' to database 'user2'
27
create table t1 (kill_id int);
28
insert into t1 values(connection_id());
30
ID USER HOST DB COMMAND TIME STATE INFO
32
3 user1 # user1 # # # show processlist
33
select ((@id := kill_id) - kill_id) from t1;
34
((@id := kill_id) - kill_id)
37
select ((@id := kill_id) - kill_id) from t1;
38
((@id := kill_id) - kill_id)
40
select @id != connection_id();
41
@id != connection_id()
43
update t1 set kill_id = connection_id();
45
ID USER HOST DB COMMAND TIME STATE INFO
46
4 user2 # user2 # # # show processlist
47
select ((@id := kill_id) - kill_id) from t1;
48
((@id := kill_id) - kill_id)
51
ERROR HY000: Unknown thread id: 1
53
ID USER HOST DB COMMAND TIME STATE INFO
54
1 root # user2 # # # show processlist
55
3 user1 # user1 # # # show processlist
56
4 user2 # user2 # # # show processlist
57
5 user1 # user1 # # # update t1 set kill_id = connection_id()
59
select ((@id := kill_id) - kill_id) from t1;
60
((@id := kill_id) - kill_id)
63
select ((@id := kill_id) - kill_id) from t1;
64
((@id := kill_id) - kill_id)
66
select @id != connection_id();
67
@id != connection_id()
53
69
connect(localhost,authz,,authz_no,MASTER_PORT,);
54
70
ERROR 42000: Access denied for user 'authz'@'LOCALHOST' to database 'authz_no'
56
drop schema authz_yes;