Debian Codegraph @

mysql-test/suite/perfschema/r/idx_compare_ews_by_instance.result

raw
1 TABLE: "events_waits_summary_by_instance"
2 INDEXES: PK (OBJECT_INSTANCE_BEGIN), KEY (EVENT_NAME)
3
4 ===== SETUP =====
5 ## Connection Default
6 ## Disable events from the default connection
7
8 ## Create user1, user2, user3
9 CREATE USER user1@localhost;
10 CREATE USER user2@localhost;
11 CREATE USER user3@localhost;
12 GRANT ALL ON *.* to 'user1'@localhost;
13 GRANT ALL ON *.* to 'user2'@localhost;
14 GRANT ALL ON *.* to 'user3'@localhost;
15
16 ## Setup test connection 1
17 ## Setup test connection 2
18 ## Setup test connection 3
19
20 ## Default connection
21
22 ## Create data tables
23 CREATE TABLE test.t1(a INT, b INT, c INT, d INT DEFAULT 0, PRIMARY KEY(a), INDEX index_b(b), INDEX index_cb(c, b));
24 CREATE TABLE test.t2 LIKE test.t1;
25 CREATE TABLE test.t3 LIKE test.t1;
26
27 ## Generate event data from 3 connections
28 ## Connection 1
29 ## Connection 2
30 ## Connection 3
31 ## Connection 2
32 ## Create prepared statements on connection 2
33 PREPARE st1 FROM 'SELECT SQRT(POW(?,2) + POW(?,2)) AS hypotenuse';
34 PREPARE st3 FROM 'INSERT INTO test.t1 SELECT * FROM test.t1 WHERE a<=?';
35 PREPARE st4 FROM '(SELECT a FROM test.t1) UNION (SELECT a+10 FROM test.t1) ORDER BY RAND()*0+a';
36 ## Create stored procedure connection 2
37 CREATE PROCEDURE SampleProc1()
38 BEGIN
39 SET @table = 'test.t1';
40 SET @s = CONCAT('SELECT * FROM ', @table);
41 PREPARE st2 FROM @s;
42 END|
43
44 Call SampleProc1() to prepare a statement
45 CALL SampleProc1();
46 ## Connection default
47
48 ## Use Connection 2 for default target thread id
49
50 ## Create index_test() procedure
51 ## Test OBJECT_INSTANCE_BEGIN
52
53 ===== BEGIN TEST =====
54 ========
55 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE object_instance_begin is null
56
57 OK: Handler_read_key
58
59 OK: Result set: Empty Expected: Empty
60
61 OK: Extra rows: 0 Missing rows: 0
62 ========
63 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE object_instance_begin is not null
64
65 OK: Handler_read_key
66
67 OK: Result set: Non-empty Expected: Non-empty
68
69 OK: Extra rows: 0 Missing rows: 0
70 ========
71 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE object_instance_begin = @object_instance_begin
72
73 OK: Handler_read_key
74
75 OK: Result set: Non-empty Expected: Non-empty
76
77 OK: Extra rows: 0 Missing rows: 0
78 ========
79 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE object_instance_begin != @object_instance_begin
80
81 OK: Handler_read_key
82
83 OK: Result set: Non-empty Expected: Non-empty
84
85 OK: Extra rows: 0 Missing rows: 0
86 ========
87 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE object_instance_begin = '9999999999'
88
89 OK: Handler_read_key
90
91 OK: Result set: Empty Expected: Empty
92
93 OK: Extra rows: 0 Missing rows: 0
94 ## Test EVENT_NAME
95
96 ===== BEGIN TEST =====
97 ========
98 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE EVENT_NAME is null
99
100 OK: Handler_read_key
101
102 OK: Result set: Empty Expected: Empty
103
104 OK: Extra rows: 0 Missing rows: 0
105 ========
106 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE EVENT_NAME is not null
107
108 OK: Handler_read_key
109
110 OK: Result set: Non-empty Expected: Non-empty
111
112 OK: Extra rows: 0 Missing rows: 0
113 ========
114 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE EVENT_NAME = 'wait/synch/mutex/mysys/THR_LOCK::mutex'
115
116 OK: Handler_read_key
117
118 OK: Result set: Non-empty Expected: Non-empty
119
120 OK: Extra rows: 0 Missing rows: 0
121 ========
122 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE EVENT_NAME != 'wait/synch/mutex/mysys/THR_LOCK::mutex'
123
124 OK: Handler_read_key
125
126 OK: Result set: Non-empty Expected: Non-empty
127
128 OK: Extra rows: 0 Missing rows: 0
129 ========
130 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE EVENT_NAME = 'impossible'
131
132 OK: Handler_read_key
133
134 OK: Result set: Empty Expected: Empty
135
136 OK: Extra rows: 0 Missing rows: 0
137 ========
138 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE EVENT_NAME != 'impossible' ORDER BY EVENT_NAME DESC
139
140 OK: Handler_read_key
141
142 OK: Result set: Non-empty Expected: Non-empty
143
144 OK: Extra rows: 0 Missing rows: 0
145
146 ===== BEGIN TEST =====
147 ========
148 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE EVENT_NAME is null
149
150 OK: Handler_read_key
151
152 OK: Result set: Empty Expected: Empty
153
154 OK: Extra rows: 0 Missing rows: 0
155 ========
156 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE EVENT_NAME is not null
157
158 OK: Handler_read_key
159
160 OK: Result set: Non-empty Expected: Non-empty
161
162 OK: Extra rows: 0 Missing rows: 0
163 ========
164 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE EVENT_NAME = 'wait/synch/cond/sql/COND_thd_list'
165
166 OK: Handler_read_key
167
168 OK: Result set: Non-empty Expected: Non-empty
169
170 OK: Extra rows: 0 Missing rows: 0
171 ========
172 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE EVENT_NAME != 'wait/synch/cond/sql/COND_thd_list'
173
174 OK: Handler_read_key
175
176 OK: Result set: Non-empty Expected: Non-empty
177
178 OK: Extra rows: 0 Missing rows: 0
179 ========
180 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE EVENT_NAME = 'impossible'
181
182 OK: Handler_read_key
183
184 OK: Result set: Empty Expected: Empty
185
186 OK: Extra rows: 0 Missing rows: 0
187 ========
188 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE EVENT_NAME != 'impossible' ORDER BY EVENT_NAME DESC
189
190 OK: Handler_read_key
191
192 OK: Result set: Non-empty Expected: Non-empty
193
194 OK: Extra rows: 0 Missing rows: 0
195
196 ===== BEGIN TEST =====
197 ========
198 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE EVENT_NAME is null
199
200 OK: Handler_read_key
201
202 OK: Result set: Empty Expected: Empty
203
204 OK: Extra rows: 0 Missing rows: 0
205 ========
206 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE EVENT_NAME is not null
207
208 OK: Handler_read_key
209
210 OK: Result set: Non-empty Expected: Non-empty
211
212 OK: Extra rows: 0 Missing rows: 0
213 ========
214 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE EVENT_NAME = 'wait/synch/prlock/sql/MDL_lock::rwlock'
215
216 OK: Handler_read_key
217
218 OK: Result set: Non-empty Expected: Non-empty
219
220 OK: Extra rows: 0 Missing rows: 0
221 ========
222 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE EVENT_NAME != 'wait/synch/prlock/sql/MDL_lock::rwlock'
223
224 OK: Handler_read_key
225
226 OK: Result set: Non-empty Expected: Non-empty
227
228 OK: Extra rows: 0 Missing rows: 0
229 ========
230 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE EVENT_NAME = 'impossible'
231
232 OK: Handler_read_key
233
234 OK: Result set: Empty Expected: Empty
235
236 OK: Extra rows: 0 Missing rows: 0
237 ========
238 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE EVENT_NAME != 'impossible' ORDER BY EVENT_NAME DESC
239
240 OK: Handler_read_key
241
242 OK: Result set: Non-empty Expected: Non-empty
243
244 OK: Extra rows: 0 Missing rows: 0
245
246 ===== BEGIN TEST =====
247 ========
248 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE EVENT_NAME is null
249
250 OK: Handler_read_key
251
252 OK: Result set: Empty Expected: Empty
253
254 OK: Extra rows: 0 Missing rows: 0
255 ========
256 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE EVENT_NAME is not null
257
258 OK: Handler_read_key
259
260 OK: Result set: Non-empty Expected: Non-empty
261
262 OK: Extra rows: 0 Missing rows: 0
263 ========
264 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE EVENT_NAME = 'wait/io/socket/sql/client_connection'
265
266 OK: Handler_read_key
267
268 OK: Result set: Non-empty Expected: Non-empty
269
270 OK: Extra rows: 0 Missing rows: 0
271 ========
272 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE EVENT_NAME != 'wait/io/socket/sql/client_connection'
273
274 OK: Handler_read_key
275
276 OK: Result set: Non-empty Expected: Non-empty
277
278 OK: Extra rows: 0 Missing rows: 0
279 ========
280 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE EVENT_NAME = 'impossible'
281
282 OK: Handler_read_key
283
284 OK: Result set: Empty Expected: Empty
285
286 OK: Extra rows: 0 Missing rows: 0
287 ========
288 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE EVENT_NAME != 'impossible' ORDER BY EVENT_NAME DESC
289
290 OK: Handler_read_key
291
292 OK: Result set: Non-empty Expected: Non-empty
293
294 OK: Extra rows: 0 Missing rows: 0
295
296 ===== BEGIN TEST =====
297 ========
298 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE EVENT_NAME is null
299
300 OK: Handler_read_key
301
302 OK: Result set: Empty Expected: Empty
303
304 OK: Extra rows: 0 Missing rows: 0
305 ========
306 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE EVENT_NAME is not null
307
308 OK: Handler_read_key
309
310 OK: Result set: Non-empty Expected: Non-empty
311
312 OK: Extra rows: 0 Missing rows: 0
313 ========
314 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE EVENT_NAME = 'wait/io/file/mysys/charset'
315
316 OK: Handler_read_key
317
318 OK: Result set: Non-empty Expected: Non-empty
319
320 OK: Extra rows: 0 Missing rows: 0
321 ========
322 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE EVENT_NAME != 'wait/io/file/mysys/charset'
323
324 OK: Handler_read_key
325
326 OK: Result set: Non-empty Expected: Non-empty
327
328 OK: Extra rows: 0 Missing rows: 0
329 ========
330 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE EVENT_NAME = 'impossible'
331
332 OK: Handler_read_key
333
334 OK: Result set: Empty Expected: Empty
335
336 OK: Extra rows: 0 Missing rows: 0
337 ========
338 SELECT * FROM performance_schema.events_waits_summary_by_instance WHERE EVENT_NAME != 'impossible' ORDER BY EVENT_NAME DESC
339
340 OK: Handler_read_key
341
342 OK: Result set: Non-empty Expected: Non-empty
343
344 OK: Extra rows: 0 Missing rows: 0
345
346 ===== CLEAN UP =====
347 ## Default connection
348 DEALLOCATE PREPARE st1;
349 DEALLOCATE PREPARE st2;
350 DEALLOCATE PREPARE st3;
351 DEALLOCATE PREPARE st4;
352 DROP PROCEDURE SampleProc1;
353 DROP PROCEDURE index_test;
354 DROP TABLE IF EXISTS test.indexes_off;
355 DROP TABLE IF EXISTS test.indexes_on;
356 DROP TABLE test.t1;
357 DROP TABLE test.t2;
358 DROP TABLE test.t3;
359 REVOKE ALL PRIVILEGES, GRANT OPTION FROM user1@localhost;
360 REVOKE ALL PRIVILEGES, GRANT OPTION FROM user2@localhost;
361 REVOKE ALL PRIVILEGES, GRANT OPTION FROM user3@localhost;
362 DROP USER user1@localhost;
363 DROP USER user2@localhost;
364 DROP USER user3@localhost;
365 UPDATE performance_schema.threads SET INSTRUMENTED = 'YES';