1
# Tests for the performance schema
3
# =======================================
4
# HELPER include/connection_load.inc
5
# =======================================
9
connect (con1a, localhost, user1, , );
10
select "user1 in con1a" as status;
13
connect (con1b, localhost, user1, , );
14
select "user1 in con1b" as status;
17
connect (con1c, localhost, user1, , );
18
select "user1 in con1c" as status;
21
connect (con2a, localhost, user2, , );
22
select "user2 in con2a" as status;
25
connect (con2b, localhost, user2, , );
26
select "user2 in con2b" as status;
29
connect (con2c, localhost, user2, , );
30
select "user2 in con2c" as status;
33
connect (con3a, localhost, user3, , );
34
select "user3 in con3a" as status;
37
connect (con3b, localhost, user3, , );
38
select "user3 in con3b" as status;
41
connect (con3c, localhost, user3, , );
42
select "user3 in con3c" as status;
49
# Wait for the disconnect to complete
51
select count(*) = 8 from performance_schema.threads
52
where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user%';
53
--source include/wait_condition.inc
55
select "con1a disconnected" as status;
60
# Wait for the disconnect to complete
62
select count(*) = 7 from performance_schema.threads
63
where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user%';
64
--source include/wait_condition.inc
66
select "con2a disconnected" as status;
71
# Wait for the disconnect to complete
73
select count(*) = 6 from performance_schema.threads
74
where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user%';
75
--source include/wait_condition.inc
77
select "con3a disconnected" as status;
80
truncate table performance_schema.accounts;
82
truncate table performance_schema.users;
84
truncate table performance_schema.hosts;
87
connect (con4a, localhost, user4, , );
88
select "user4 in con4a" as status;
91
connect (con4b, localhost, user4, , );
92
select "user4 in con4b" as status;
95
connect (con4c, localhost, user4, , );
96
select "user4 in con4c" as status;
103
# Wait for the disconnect to complete
105
select count(*) = 8 from performance_schema.threads
106
where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user%';
107
--source include/wait_condition.inc
109
select "con1b disconnected" as status;
114
# Wait for the disconnect to complete
116
select count(*) = 7 from performance_schema.threads
117
where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user%';
118
--source include/wait_condition.inc
120
select "con2b disconnected" as status;
125
# Wait for the disconnect to complete
127
select count(*) = 6 from performance_schema.threads
128
where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user%';
129
--source include/wait_condition.inc
131
select "con3b disconnected" as status;
136
# Wait for the disconnect to complete
138
select count(*) = 5 from performance_schema.threads
139
where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user%';
140
--source include/wait_condition.inc
142
select "con1c disconnected" as status;
147
# Wait for the disconnect to complete
149
select count(*) = 4 from performance_schema.threads
150
where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user%';
151
--source include/wait_condition.inc
153
select "con2c disconnected" as status;
158
# Wait for the disconnect to complete
160
select count(*) = 3 from performance_schema.threads
161
where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user%';
162
--source include/wait_condition.inc
164
select "con3c disconnected" as status;
167
truncate table performance_schema.accounts;
169
truncate table performance_schema.users;
171
truncate table performance_schema.hosts;
174
connect (con5a, localhost, user5, , );
175
select "user5 in con5a" as status;
178
connect (con5b, localhost, user5, , );
179
select "user5 in con5b" as status;
182
connect (con5c, localhost, user5, , );
183
select "user5 in con5c" as status;
190
# Wait for the disconnect to complete
192
select count(*) = 5 from performance_schema.threads
193
where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user%';
194
--source include/wait_condition.inc
198
# Wait for the disconnect to complete
200
select count(*) = 4 from performance_schema.threads
201
where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user%';
202
--source include/wait_condition.inc
206
# Wait for the disconnect to complete
208
select count(*) = 3 from performance_schema.threads
209
where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user%';
210
--source include/wait_condition.inc
214
# Wait for the disconnect to complete
216
select count(*) = 2 from performance_schema.threads
217
where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user%';
218
--source include/wait_condition.inc
222
# Wait for the disconnect to complete
224
select count(*) = 1 from performance_schema.threads
225
where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user%';
226
--source include/wait_condition.inc
230
# Wait for the disconnect to complete
232
select count(*) = 0 from performance_schema.threads
233
where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user%';
234
--source include/wait_condition.inc
236
select "con 5a, 5b, 5c, 6a, 6b, 6c disconnected" as status;
239
truncate table performance_schema.hosts;
241
truncate table performance_schema.users;
243
truncate table performance_schema.accounts;