~drizzle-trunk/drizzle/development

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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
create database user1;
create database user2;
show databases;
Database
DATA_DICTIONARY
INFORMATION_SCHEMA
mysql
test
user1
user2
use user2;
create table t1 (kill_id int);
insert into t1 values(connection_id());
SELECT * from user1.dont_exist;
ERROR 42S02: Table 'user1.dont_exist' doesn't exist
show databases;
Database
DATA_DICTIONARY
INFORMATION_SCHEMA
user1
SELECT * from user2.dont_exist;
ERROR 42000: Access denied for user 'user1'@'LOCALHOST' to database 'user2'
create database authorize_fail;
ERROR 42000: Access denied for user 'user1'@'LOCALHOST' to database 'authorize_fail'
drop database user2;
ERROR 42000: Access denied for user 'user1'@'LOCALHOST' to database 'user2'
create table t1 (kill_id int);
insert into t1 values(connection_id());
show processlist;
ID	USER	HOST	DB	COMMAND	TIME	STATE	INFO
2	user1	#	user1	#	#	#	
3	user1	#	user1	#	#	#	show processlist
select ((@id := kill_id) - kill_id) from t1;
((@id := kill_id) - kill_id)
0
kill @id;
select ((@id := kill_id) - kill_id) from t1;
((@id := kill_id) - kill_id)
0
select @id != connection_id();
@id != connection_id()
1
update t1 set kill_id = connection_id();
show processlist;
ID	USER	HOST	DB	COMMAND	TIME	STATE	INFO
4	user2	#	user2	#	#	#	show processlist
select ((@id := kill_id) - kill_id) from t1;
((@id := kill_id) - kill_id)
0
kill @id;
ERROR HY000: Unknown thread id: 1
show processlist;
ID	USER	HOST	DB	COMMAND	TIME	STATE	INFO
1	root	#	user2	#	#	#	show processlist
3	user1	#	user1	#	#	#	show processlist
4	user2	#	user2	#	#	#	show processlist
5	user1	#	user1	#	#	#	update t1 set kill_id = connection_id()
use user1;
select ((@id := kill_id) - kill_id) from t1;
((@id := kill_id) - kill_id)
0
kill @id;
select ((@id := kill_id) - kill_id) from t1;
((@id := kill_id) - kill_id)
0
select @id != connection_id();
@id != connection_id()
1
connect(localhost,authz,,authz_no,MASTER_PORT,);
ERROR 42000: Access denied for user 'authz'@'LOCALHOST' to database 'authz_no'
drop schema user1;
drop schema user2;