Debian Codegraph @

mysql-test/suite/perfschema/include/event_aggregate_load.inc

raw
1 # Tests for the performance schema
2
3 # =======================================
4 # HELPER include/event_aggregate_load.inc
5 # =======================================
6
7 echo "================== Step 1 ==================";
8 call dump_thread();
9 execute dump_waits_account;
10 execute dump_waits_user;
11 execute dump_waits_host;
12 execute dump_waits_global;
13 execute dump_waits_history;
14 execute dump_stages_account;
15 execute dump_stages_user;
16 execute dump_stages_host;
17 execute dump_stages_global;
18 execute dump_stages_history;
19 execute dump_statements_account;
20 execute dump_statements_user;
21 execute dump_statements_host;
22 execute dump_statements_global;
23 execute dump_statements_history;
24 execute dump_transactions_account;
25 execute dump_transactions_user;
26 execute dump_transactions_host;
27 execute dump_transactions_global;
28 execute dump_transactions_history;
29 execute dump_accounts;
30 execute dump_users;
31 execute dump_hosts;
32
33 # Notes about this test
34 #
35 # Each connect causes 2 wait/synch/mutex/sql/LOCK_connection_count events:
36 # - 1 in mysqld.cc, create_new_thread(), for the main thread
37 # - 1 in sql_connect.cc, check_user(), for the connected thread
38 # The main thread does not count for BY_ACCOUNT / BY_HOST.
39 # The user thread does count for BY_ACCOUNT, BY_HOST
40 #
41 # Each uuid_short() causes 1 wait/synch/mutex/sql/LOCK_uuid_generator
42 #
43 # To avoid noise from main, the background threads are disabled.
44
45 connect (con1, localhost, user1, , );
46
47 echo "================== con1 connected ==================";
48
49 --connection default
50
51 # Wait for the connect to complete
52 let $wait_condition=
53 select count(*) = 1 from performance_schema.threads
54 where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user1';
55 --source include/wait_condition.inc
56
57 echo "================== Step 2 ==================";
58 call dump_thread();
59 execute dump_waits_account;
60 execute dump_waits_user;
61 execute dump_waits_host;
62 execute dump_waits_global;
63 execute dump_waits_history;
64 execute dump_stages_account;
65 execute dump_stages_user;
66 execute dump_stages_host;
67 execute dump_stages_global;
68 execute dump_stages_history;
69 execute dump_statements_account;
70 execute dump_statements_user;
71 execute dump_statements_host;
72 execute dump_statements_global;
73 execute dump_statements_history;
74 execute dump_transactions_account;
75 execute dump_transactions_user;
76 execute dump_transactions_host;
77 execute dump_transactions_global;
78 execute dump_transactions_history;
79 execute dump_accounts;
80 execute dump_users;
81 execute dump_hosts;
82
83 --connection con1
84
85 select uuid_short() <> 1;
86 select uuid_short() <> 1;
87 start transaction;
88 insert into test.t1 values ("marker");
89 commit;
90 select test.f(10,20);
91
92 echo "================== con1 marker ==================";
93
94 --connection default
95
96 # Wait for the payload to complete
97 let $wait_condition=
98 select count(*) = 1 from performance_schema.events_waits_current
99 where EVENT_NAME= 'idle';
100 --source include/wait_condition.inc
101
102 echo "================== Step 3 ==================";
103 call dump_thread();
104 execute dump_waits_account;
105 execute dump_waits_user;
106 execute dump_waits_host;
107 execute dump_waits_global;
108 execute dump_waits_history;
109 execute dump_stages_account;
110 execute dump_stages_user;
111 execute dump_stages_host;
112 execute dump_stages_global;
113 execute dump_stages_history;
114 execute dump_statements_account;
115 execute dump_statements_user;
116 execute dump_statements_host;
117 execute dump_statements_global;
118 execute dump_statements_history;
119 execute dump_transactions_account;
120 execute dump_transactions_user;
121 execute dump_transactions_host;
122 execute dump_transactions_global;
123 execute dump_transactions_history;
124 execute dump_accounts;
125 execute dump_users;
126 execute dump_hosts;
127
128 # Debugging helpers
129 # select * from performance_schema.events_waits_history_long;
130 # select PROCESSLIST_USER, PROCESSLIST_HOST, INSTRUMENTED from performance_schema.threads;
131
132 connect (con2, localhost, user2, , );
133
134 echo "================== con2 connected ==================";
135
136 --connection default
137
138 # Wait for the connect to complete
139 let $wait_condition=
140 select count(*) = 1 from performance_schema.threads
141 where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user2';
142 --source include/wait_condition.inc
143
144 echo "================== Step 4 ==================";
145 call dump_thread();
146 execute dump_waits_account;
147 execute dump_waits_user;
148 execute dump_waits_host;
149 execute dump_waits_global;
150 execute dump_waits_history;
151 execute dump_stages_account;
152 execute dump_stages_user;
153 execute dump_stages_host;
154 execute dump_stages_global;
155 execute dump_stages_history;
156 execute dump_statements_account;
157 execute dump_statements_user;
158 execute dump_statements_host;
159 execute dump_statements_global;
160 execute dump_statements_history;
161 execute dump_transactions_account;
162 execute dump_transactions_user;
163 execute dump_transactions_host;
164 execute dump_transactions_global;
165 execute dump_transactions_history;
166 execute dump_accounts;
167 execute dump_users;
168 execute dump_hosts;
169
170 --connection con2
171
172 select uuid_short() <> 1;
173 select uuid_short() <> 1;
174 start transaction;
175 insert into test.t1 values ("marker");
176 commit;
177 select test.f(10,20);
178
179 echo "================== con2 marker ==================";
180
181 --connection default
182
183 # Wait for the payload to complete
184 let $wait_condition=
185 select count(*) = 2 from performance_schema.events_waits_current
186 where EVENT_NAME= 'idle';
187 --source include/wait_condition.inc
188
189 echo "================== Step 5 ==================";
190 call dump_thread();
191 execute dump_waits_account;
192 execute dump_waits_user;
193 execute dump_waits_host;
194 execute dump_waits_global;
195 execute dump_waits_history;
196 execute dump_stages_account;
197 execute dump_stages_user;
198 execute dump_stages_host;
199 execute dump_stages_global;
200 execute dump_stages_history;
201 execute dump_statements_account;
202 execute dump_statements_user;
203 execute dump_statements_host;
204 execute dump_statements_global;
205 execute dump_statements_history;
206 execute dump_transactions_account;
207 execute dump_transactions_user;
208 execute dump_transactions_host;
209 execute dump_transactions_global;
210 execute dump_transactions_history;
211 execute dump_accounts;
212 execute dump_users;
213 execute dump_hosts;
214
215 connect (con3, localhost, user3, , );
216
217 echo "================== con3 connected ==================";
218
219 --connection default
220
221 # Wait for the connect to complete
222 let $wait_condition=
223 select count(*) = 1 from performance_schema.threads
224 where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user3';
225 --source include/wait_condition.inc
226
227 echo "================== Step 6 ==================";
228 call dump_thread();
229 execute dump_waits_account;
230 execute dump_waits_user;
231 execute dump_waits_host;
232 execute dump_waits_global;
233 execute dump_waits_history;
234 execute dump_stages_account;
235 execute dump_stages_user;
236 execute dump_stages_host;
237 execute dump_stages_global;
238 execute dump_stages_history;
239 execute dump_statements_account;
240 execute dump_statements_user;
241 execute dump_statements_host;
242 execute dump_statements_global;
243 execute dump_statements_history;
244 execute dump_transactions_account;
245 execute dump_transactions_user;
246 execute dump_transactions_host;
247 execute dump_transactions_global;
248 execute dump_transactions_history;
249 execute dump_accounts;
250 execute dump_users;
251 execute dump_hosts;
252
253 --connection con3
254
255 select uuid_short() <> 1;
256 select uuid_short() <> 1;
257 start transaction;
258 insert into test.t1 values ("marker");
259 commit;
260 select test.f(10,20);
261
262 echo "================== con3 marker ==================";
263
264 --connection default
265
266 # Wait for the payload to complete
267 let $wait_condition=
268 select count(*) = 3 from performance_schema.events_waits_current
269 where EVENT_NAME= 'idle';
270 --source include/wait_condition.inc
271
272 echo "================== Step 7 ==================";
273 call dump_thread();
274 execute dump_waits_account;
275 execute dump_waits_user;
276 execute dump_waits_host;
277 execute dump_waits_global;
278 execute dump_waits_history;
279 execute dump_stages_account;
280 execute dump_stages_user;
281 execute dump_stages_host;
282 execute dump_stages_global;
283 execute dump_stages_history;
284 execute dump_statements_account;
285 execute dump_statements_user;
286 execute dump_statements_host;
287 execute dump_statements_global;
288 execute dump_statements_history;
289 execute dump_transactions_account;
290 execute dump_transactions_user;
291 execute dump_transactions_host;
292 execute dump_transactions_global;
293 execute dump_transactions_history;
294 execute dump_accounts;
295 execute dump_users;
296 execute dump_hosts;
297
298 connect (con4, localhost, user4, , );
299
300 echo "================== con4 connected ==================";
301
302 --connection default
303
304 # Wait for the connect to complete
305 let $wait_condition=
306 select count(*) = 1 from performance_schema.threads
307 where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user4';
308 --source include/wait_condition.inc
309
310 echo "================== Step 8 ==================";
311 call dump_thread();
312 execute dump_waits_account;
313 execute dump_waits_user;
314 execute dump_waits_host;
315 execute dump_waits_global;
316 execute dump_waits_history;
317 execute dump_stages_account;
318 execute dump_stages_user;
319 execute dump_stages_host;
320 execute dump_stages_global;
321 execute dump_stages_history;
322 execute dump_statements_account;
323 execute dump_statements_user;
324 execute dump_statements_host;
325 execute dump_statements_global;
326 execute dump_statements_history;
327 execute dump_transactions_account;
328 execute dump_transactions_user;
329 execute dump_transactions_host;
330 execute dump_transactions_global;
331 execute dump_transactions_history;
332 execute dump_accounts;
333 execute dump_users;
334 execute dump_hosts;
335
336 --connection con4
337
338 select uuid_short() <> 1;
339 select uuid_short() <> 1;
340 start transaction;
341 insert into test.t1 values ("marker");
342 commit;
343 select test.f(10,20);
344
345 echo "================== con4 marker ==================";
346
347 --connection default
348
349 # Wait for the payload to complete
350 let $wait_condition=
351 select count(*) = 4 from performance_schema.events_waits_current
352 where EVENT_NAME= 'idle';
353 --source include/wait_condition.inc
354
355 echo "================== Step 9 ==================";
356 call dump_thread();
357 execute dump_waits_account;
358 execute dump_waits_user;
359 execute dump_waits_host;
360 execute dump_waits_global;
361 execute dump_waits_history;
362 execute dump_stages_account;
363 execute dump_stages_user;
364 execute dump_stages_host;
365 execute dump_stages_global;
366 execute dump_stages_history;
367 execute dump_statements_account;
368 execute dump_statements_user;
369 execute dump_statements_host;
370 execute dump_statements_global;
371 execute dump_statements_history;
372 execute dump_transactions_account;
373 execute dump_transactions_user;
374 execute dump_transactions_host;
375 execute dump_transactions_global;
376 execute dump_transactions_history;
377 execute dump_accounts;
378 execute dump_users;
379 execute dump_hosts;
380
381 --disconnect con1
382
383 --connection default
384
385 # Wait for the disconnect to complete
386 let $wait_condition=
387 select count(*) = 0 from performance_schema.threads
388 where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user1';
389 --source include/wait_condition.inc
390
391 echo "================== con1 disconnected ==================";
392
393 echo "================== Step 10 ==================";
394 call dump_thread();
395 execute dump_waits_account;
396 execute dump_waits_user;
397 execute dump_waits_host;
398 execute dump_waits_global;
399 execute dump_waits_history;
400 execute dump_stages_account;
401 execute dump_stages_user;
402 execute dump_stages_host;
403 execute dump_stages_global;
404 execute dump_stages_history;
405 execute dump_statements_account;
406 execute dump_statements_user;
407 execute dump_statements_host;
408 execute dump_statements_global;
409 execute dump_statements_history;
410 execute dump_transactions_account;
411 execute dump_transactions_user;
412 execute dump_transactions_host;
413 execute dump_transactions_global;
414 execute dump_transactions_history;
415 execute dump_accounts;
416 execute dump_users;
417 execute dump_hosts;
418
419 --disconnect con2
420
421 --connection default
422
423 # Wait for the disconnect to complete
424 let $wait_condition=
425 select count(*) = 0 from performance_schema.threads
426 where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user2';
427 --source include/wait_condition.inc
428
429 echo "================== con2 disconnected ==================";
430
431 echo "================== Step 11 ==================";
432 call dump_thread();
433 execute dump_waits_account;
434 execute dump_waits_user;
435 execute dump_waits_host;
436 execute dump_waits_global;
437 execute dump_waits_history;
438 execute dump_stages_account;
439 execute dump_stages_user;
440 execute dump_stages_host;
441 execute dump_stages_global;
442 execute dump_stages_history;
443 execute dump_statements_account;
444 execute dump_statements_user;
445 execute dump_statements_host;
446 execute dump_statements_global;
447 execute dump_statements_history;
448 execute dump_transactions_account;
449 execute dump_transactions_user;
450 execute dump_transactions_host;
451 execute dump_transactions_global;
452 execute dump_transactions_history;
453 execute dump_accounts;
454 execute dump_users;
455 execute dump_hosts;
456
457 --disconnect con3
458
459 --connection default
460
461 # Wait for the disconnect to complete
462 let $wait_condition=
463 select count(*) = 0 from performance_schema.threads
464 where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user3';
465 --source include/wait_condition.inc
466
467 echo "================== con3 disconnected ==================";
468
469 echo "================== Step 12 ==================";
470 call dump_thread();
471 execute dump_waits_account;
472 execute dump_waits_user;
473 execute dump_waits_host;
474 execute dump_waits_global;
475 execute dump_waits_history;
476 execute dump_stages_account;
477 execute dump_stages_user;
478 execute dump_stages_host;
479 execute dump_stages_global;
480 execute dump_stages_history;
481 execute dump_statements_account;
482 execute dump_statements_user;
483 execute dump_statements_host;
484 execute dump_statements_global;
485 execute dump_statements_history;
486 execute dump_transactions_account;
487 execute dump_transactions_user;
488 execute dump_transactions_host;
489 execute dump_transactions_global;
490 execute dump_transactions_history;
491 execute dump_accounts;
492 execute dump_users;
493 execute dump_hosts;
494
495 --disconnect con4
496
497 --connection default
498
499 # Wait for the disconnect to complete
500 let $wait_condition=
501 select count(*) = 0 from performance_schema.threads
502 where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user4';
503 --source include/wait_condition.inc
504
505 echo "================== con4 disconnected ==================";
506
507 echo "================== Step 13 ==================";
508 call dump_thread();
509 execute dump_waits_account;
510 execute dump_waits_user;
511 execute dump_waits_host;
512 execute dump_waits_global;
513 execute dump_waits_history;
514 execute dump_stages_account;
515 execute dump_stages_user;
516 execute dump_stages_host;
517 execute dump_stages_global;
518 execute dump_stages_history;
519 execute dump_statements_account;
520 execute dump_statements_user;
521 execute dump_statements_host;
522 execute dump_statements_global;
523 execute dump_statements_history;
524 execute dump_transactions_account;
525 execute dump_transactions_user;
526 execute dump_transactions_host;
527 execute dump_transactions_global;
528 execute dump_transactions_history;
529 execute dump_accounts;
530 execute dump_users;
531 execute dump_hosts;
532
533 --connection default
534
535 truncate performance_schema.events_waits_summary_by_thread_by_event_name;
536
537 echo "================== WAITS_BY_THREAD truncated ==================";
538
539 echo "================== Step 14 ==================";
540 call dump_thread();
541 execute dump_waits_account;
542 execute dump_waits_user;
543 execute dump_waits_host;
544 execute dump_waits_global;
545 execute dump_waits_history;
546 execute dump_stages_account;
547 execute dump_stages_user;
548 execute dump_stages_host;
549 execute dump_stages_global;
550 execute dump_stages_history;
551 execute dump_statements_account;
552 execute dump_statements_user;
553 execute dump_statements_host;
554 execute dump_statements_global;
555 execute dump_statements_history;
556 execute dump_transactions_account;
557 execute dump_transactions_user;
558 execute dump_transactions_host;
559 execute dump_transactions_global;
560 execute dump_transactions_history;
561 execute dump_accounts;
562 execute dump_users;
563 execute dump_hosts;
564
565 truncate performance_schema.events_waits_summary_by_account_by_event_name;
566
567 echo "================== WAITS_BY_ACCOUNT truncated ==================";
568
569 echo "================== Step 15 ==================";
570 call dump_thread();
571 execute dump_waits_account;
572 execute dump_waits_user;
573 execute dump_waits_host;
574 execute dump_waits_global;
575 execute dump_waits_history;
576 execute dump_stages_account;
577 execute dump_stages_user;
578 execute dump_stages_host;
579 execute dump_stages_global;
580 execute dump_stages_history;
581 execute dump_statements_account;
582 execute dump_statements_user;
583 execute dump_statements_host;
584 execute dump_statements_global;
585 execute dump_statements_history;
586 execute dump_transactions_account;
587 execute dump_transactions_user;
588 execute dump_transactions_host;
589 execute dump_transactions_global;
590 execute dump_transactions_history;
591 execute dump_accounts;
592 execute dump_users;
593 execute dump_hosts;
594
595 truncate performance_schema.events_waits_summary_by_user_by_event_name;
596
597 echo "================== WAITS_BY_USER truncated ==================";
598
599 echo "================== Step 16 ==================";
600 call dump_thread();
601 execute dump_waits_account;
602 execute dump_waits_user;
603 execute dump_waits_host;
604 execute dump_waits_global;
605 execute dump_waits_history;
606 execute dump_stages_account;
607 execute dump_stages_user;
608 execute dump_stages_host;
609 execute dump_stages_global;
610 execute dump_stages_history;
611 execute dump_statements_account;
612 execute dump_statements_user;
613 execute dump_statements_host;
614 execute dump_statements_global;
615 execute dump_statements_history;
616 execute dump_transactions_account;
617 execute dump_transactions_user;
618 execute dump_transactions_host;
619 execute dump_transactions_global;
620 execute dump_transactions_history;
621 execute dump_accounts;
622 execute dump_users;
623 execute dump_hosts;
624
625 truncate performance_schema.events_waits_summary_by_host_by_event_name;
626
627 echo "================== WAITS_BY_HOST truncated ==================";
628
629 echo "================== Step 17 ==================";
630 call dump_thread();
631 execute dump_waits_account;
632 execute dump_waits_user;
633 execute dump_waits_host;
634 execute dump_waits_global;
635 execute dump_waits_history;
636 execute dump_stages_account;
637 execute dump_stages_user;
638 execute dump_stages_host;
639 execute dump_stages_global;
640 execute dump_stages_history;
641 execute dump_statements_account;
642 execute dump_statements_user;
643 execute dump_statements_host;
644 execute dump_statements_global;
645 execute dump_statements_history;
646 execute dump_transactions_account;
647 execute dump_transactions_user;
648 execute dump_transactions_host;
649 execute dump_transactions_global;
650 execute dump_transactions_history;
651 execute dump_accounts;
652 execute dump_users;
653 execute dump_hosts;
654
655 truncate performance_schema.events_waits_summary_global_by_event_name;
656
657 echo "================== WAITS_GLOBAL truncated ==================";
658
659 echo "================== Step 18 ==================";
660 call dump_thread();
661 execute dump_waits_account;
662 execute dump_waits_user;
663 execute dump_waits_host;
664 execute dump_waits_global;
665 execute dump_waits_history;
666 execute dump_stages_account;
667 execute dump_stages_user;
668 execute dump_stages_host;
669 execute dump_stages_global;
670 execute dump_stages_history;
671 execute dump_statements_account;
672 execute dump_statements_user;
673 execute dump_statements_host;
674 execute dump_statements_global;
675 execute dump_statements_history;
676 execute dump_transactions_account;
677 execute dump_transactions_user;
678 execute dump_transactions_host;
679 execute dump_transactions_global;
680 execute dump_transactions_history;
681 execute dump_accounts;
682 execute dump_users;
683 execute dump_hosts;
684
685 truncate performance_schema.events_stages_summary_by_thread_by_event_name;
686
687 echo "================== STAGES_BY_THREAD truncated ==================";
688
689 echo "================== Step 19 ==================";
690 call dump_thread();
691 execute dump_waits_account;
692 execute dump_waits_user;
693 execute dump_waits_host;
694 execute dump_waits_global;
695 execute dump_waits_history;
696 execute dump_stages_account;
697 execute dump_stages_user;
698 execute dump_stages_host;
699 execute dump_stages_global;
700 execute dump_stages_history;
701 execute dump_statements_account;
702 execute dump_statements_user;
703 execute dump_statements_host;
704 execute dump_statements_global;
705 execute dump_statements_history;
706 execute dump_transactions_account;
707 execute dump_transactions_user;
708 execute dump_transactions_host;
709 execute dump_transactions_global;
710 execute dump_transactions_history;
711 execute dump_accounts;
712 execute dump_users;
713 execute dump_hosts;
714
715 truncate performance_schema.events_stages_summary_by_account_by_event_name;
716
717 echo "================== STAGES_BY_ACCOUNT truncated ==================";
718
719 echo "================== Step 20 ==================";
720 call dump_thread();
721 execute dump_waits_account;
722 execute dump_waits_user;
723 execute dump_waits_host;
724 execute dump_waits_global;
725 execute dump_waits_history;
726 execute dump_stages_account;
727 execute dump_stages_user;
728 execute dump_stages_host;
729 execute dump_stages_global;
730 execute dump_stages_history;
731 execute dump_statements_account;
732 execute dump_statements_user;
733 execute dump_statements_host;
734 execute dump_statements_global;
735 execute dump_statements_history;
736 execute dump_transactions_account;
737 execute dump_transactions_user;
738 execute dump_transactions_host;
739 execute dump_transactions_global;
740 execute dump_transactions_history;
741 execute dump_accounts;
742 execute dump_users;
743 execute dump_hosts;
744
745 truncate performance_schema.events_stages_summary_by_user_by_event_name;
746
747 echo "================== STAGES_BY_USER truncated ==================";
748
749 echo "================== Step 21 ==================";
750 call dump_thread();
751 execute dump_waits_account;
752 execute dump_waits_user;
753 execute dump_waits_host;
754 execute dump_waits_global;
755 execute dump_waits_history;
756 execute dump_stages_account;
757 execute dump_stages_user;
758 execute dump_stages_host;
759 execute dump_stages_global;
760 execute dump_stages_history;
761 execute dump_statements_account;
762 execute dump_statements_user;
763 execute dump_statements_host;
764 execute dump_statements_global;
765 execute dump_statements_history;
766 execute dump_transactions_account;
767 execute dump_transactions_user;
768 execute dump_transactions_host;
769 execute dump_transactions_global;
770 execute dump_transactions_history;
771 execute dump_accounts;
772 execute dump_users;
773 execute dump_hosts;
774
775 truncate performance_schema.events_stages_summary_by_host_by_event_name;
776
777 echo "================== STAGES_BY_HOST truncated ==================";
778
779 echo "================== Step 22 ==================";
780 call dump_thread();
781 execute dump_waits_account;
782 execute dump_waits_user;
783 execute dump_waits_host;
784 execute dump_waits_global;
785 execute dump_waits_history;
786 execute dump_stages_account;
787 execute dump_stages_user;
788 execute dump_stages_host;
789 execute dump_stages_global;
790 execute dump_stages_history;
791 execute dump_statements_account;
792 execute dump_statements_user;
793 execute dump_statements_host;
794 execute dump_statements_global;
795 execute dump_statements_history;
796 execute dump_transactions_account;
797 execute dump_transactions_user;
798 execute dump_transactions_host;
799 execute dump_transactions_global;
800 execute dump_transactions_history;
801 execute dump_accounts;
802 execute dump_users;
803 execute dump_hosts;
804
805 truncate performance_schema.events_stages_summary_global_by_event_name;
806
807 echo "================== STAGES_GLOBAL truncated ==================";
808
809 echo "================== Step 23 ==================";
810 call dump_thread();
811 execute dump_waits_account;
812 execute dump_waits_user;
813 execute dump_waits_host;
814 execute dump_waits_global;
815 execute dump_waits_history;
816 execute dump_stages_account;
817 execute dump_stages_user;
818 execute dump_stages_host;
819 execute dump_stages_global;
820 execute dump_stages_history;
821 execute dump_statements_account;
822 execute dump_statements_user;
823 execute dump_statements_host;
824 execute dump_statements_global;
825 execute dump_statements_history;
826 execute dump_transactions_account;
827 execute dump_transactions_user;
828 execute dump_transactions_host;
829 execute dump_transactions_global;
830 execute dump_transactions_history;
831 execute dump_accounts;
832 execute dump_users;
833 execute dump_hosts;
834
835 truncate performance_schema.events_statements_summary_by_thread_by_event_name;
836
837 echo "================== STATEMENTS_BY_THREAD truncated ==================";
838
839 echo "================== Step 24 ==================";
840 call dump_thread();
841 execute dump_waits_account;
842 execute dump_waits_user;
843 execute dump_waits_host;
844 execute dump_waits_global;
845 execute dump_waits_history;
846 execute dump_stages_account;
847 execute dump_stages_user;
848 execute dump_stages_host;
849 execute dump_stages_global;
850 execute dump_stages_history;
851 execute dump_statements_account;
852 execute dump_statements_user;
853 execute dump_statements_host;
854 execute dump_statements_global;
855 execute dump_statements_history;
856 execute dump_transactions_account;
857 execute dump_transactions_user;
858 execute dump_transactions_host;
859 execute dump_transactions_global;
860 execute dump_transactions_history;
861 execute dump_accounts;
862 execute dump_users;
863 execute dump_hosts;
864
865 truncate performance_schema.events_statements_summary_by_account_by_event_name;
866
867 echo "================== STATEMENTS_BY_ACCOUNT truncated ==================";
868
869 echo "================== Step 25 ==================";
870 call dump_thread();
871 execute dump_waits_account;
872 execute dump_waits_user;
873 execute dump_waits_host;
874 execute dump_waits_global;
875 execute dump_waits_history;
876 execute dump_stages_account;
877 execute dump_stages_user;
878 execute dump_stages_host;
879 execute dump_stages_global;
880 execute dump_stages_history;
881 execute dump_statements_account;
882 execute dump_statements_user;
883 execute dump_statements_host;
884 execute dump_statements_global;
885 execute dump_statements_history;
886 execute dump_transactions_account;
887 execute dump_transactions_user;
888 execute dump_transactions_host;
889 execute dump_transactions_global;
890 execute dump_transactions_history;
891 execute dump_accounts;
892 execute dump_users;
893 execute dump_hosts;
894
895 truncate performance_schema.events_statements_summary_by_user_by_event_name;
896
897 echo "================== STATEMENTS_BY_USER truncated ==================";
898
899 echo "================== Step 26 ==================";
900 call dump_thread();
901 execute dump_waits_account;
902 execute dump_waits_user;
903 execute dump_waits_host;
904 execute dump_waits_global;
905 execute dump_waits_history;
906 execute dump_stages_account;
907 execute dump_stages_user;
908 execute dump_stages_host;
909 execute dump_stages_global;
910 execute dump_stages_history;
911 execute dump_statements_account;
912 execute dump_statements_user;
913 execute dump_statements_host;
914 execute dump_statements_global;
915 execute dump_statements_history;
916 execute dump_transactions_account;
917 execute dump_transactions_user;
918 execute dump_transactions_host;
919 execute dump_transactions_global;
920 execute dump_transactions_history;
921 execute dump_accounts;
922 execute dump_users;
923 execute dump_hosts;
924
925 truncate performance_schema.events_statements_summary_by_host_by_event_name;
926
927 echo "================== STATEMENTS_BY_HOST truncated ==================";
928
929 echo "================== Step 27 ==================";
930 call dump_thread();
931 execute dump_waits_account;
932 execute dump_waits_user;
933 execute dump_waits_host;
934 execute dump_waits_global;
935 execute dump_waits_history;
936 execute dump_stages_account;
937 execute dump_stages_user;
938 execute dump_stages_host;
939 execute dump_stages_global;
940 execute dump_stages_history;
941 execute dump_statements_account;
942 execute dump_statements_user;
943 execute dump_statements_host;
944 execute dump_statements_global;
945 execute dump_statements_history;
946 execute dump_transactions_account;
947 execute dump_transactions_user;
948 execute dump_transactions_host;
949 execute dump_transactions_global;
950 execute dump_transactions_history;
951 execute dump_accounts;
952 execute dump_users;
953 execute dump_hosts;
954
955 truncate performance_schema.events_statements_summary_global_by_event_name;
956
957 echo "================== STATEMENTS_GLOBAL truncated ==================";
958
959 echo "================== Step 28 ==================";
960 call dump_thread();
961 execute dump_waits_account;
962 execute dump_waits_user;
963 execute dump_waits_host;
964 execute dump_waits_global;
965 execute dump_waits_history;
966 execute dump_stages_account;
967 execute dump_stages_user;
968 execute dump_stages_host;
969 execute dump_stages_global;
970 execute dump_stages_history;
971 execute dump_statements_account;
972 execute dump_statements_user;
973 execute dump_statements_host;
974 execute dump_statements_global;
975 execute dump_statements_history;
976 execute dump_transactions_account;
977 execute dump_transactions_user;
978 execute dump_transactions_host;
979 execute dump_transactions_global;
980 execute dump_transactions_history;
981 execute dump_accounts;
982 execute dump_users;
983 execute dump_hosts;
984
985 truncate performance_schema.events_transactions_summary_by_thread_by_event_name;
986
987 echo "================== TRANSACTIONS_BY_THREAD truncated ==================";
988
989 echo "================== Step 29 ==================";
990 call dump_thread();
991 execute dump_waits_account;
992 execute dump_waits_user;
993 execute dump_waits_host;
994 execute dump_waits_global;
995 execute dump_waits_history;
996 execute dump_stages_account;
997 execute dump_stages_user;
998 execute dump_stages_host;
999 execute dump_stages_global;
1000 execute dump_stages_history;
1001 execute dump_statements_account;
1002 execute dump_statements_user;
1003 execute dump_statements_host;
1004 execute dump_statements_global;
1005 execute dump_statements_history;
1006 execute dump_transactions_account;
1007 execute dump_transactions_user;
1008 execute dump_transactions_host;
1009 execute dump_transactions_global;
1010 execute dump_transactions_history;
1011 execute dump_accounts;
1012 execute dump_users;
1013 execute dump_hosts;
1014
1015 truncate performance_schema.events_transactions_summary_by_account_by_event_name;
1016
1017 echo "================== TRANSACTIONS_BY_ACCOUNT truncated ==================";
1018
1019 echo "================== Step 30 ==================";
1020 call dump_thread();
1021 execute dump_waits_account;
1022 execute dump_waits_user;
1023 execute dump_waits_host;
1024 execute dump_waits_global;
1025 execute dump_waits_history;
1026 execute dump_stages_account;
1027 execute dump_stages_user;
1028 execute dump_stages_host;
1029 execute dump_stages_global;
1030 execute dump_stages_history;
1031 execute dump_statements_account;
1032 execute dump_statements_user;
1033 execute dump_statements_host;
1034 execute dump_statements_global;
1035 execute dump_statements_history;
1036 execute dump_transactions_account;
1037 execute dump_transactions_user;
1038 execute dump_transactions_host;
1039 execute dump_transactions_global;
1040 execute dump_transactions_history;
1041 execute dump_accounts;
1042 execute dump_users;
1043 execute dump_hosts;
1044
1045 truncate performance_schema.events_transactions_summary_by_user_by_event_name;
1046
1047 echo "================== TRANSACTIONS_BY_USER truncated ==================";
1048
1049 echo "================== Step 31 ==================";
1050 call dump_thread();
1051 execute dump_waits_account;
1052 execute dump_waits_user;
1053 execute dump_waits_host;
1054 execute dump_waits_global;
1055 execute dump_waits_history;
1056 execute dump_stages_account;
1057 execute dump_stages_user;
1058 execute dump_stages_host;
1059 execute dump_stages_global;
1060 execute dump_stages_history;
1061 execute dump_statements_account;
1062 execute dump_statements_user;
1063 execute dump_statements_host;
1064 execute dump_statements_global;
1065 execute dump_statements_history;
1066 execute dump_transactions_account;
1067 execute dump_transactions_user;
1068 execute dump_transactions_host;
1069 execute dump_transactions_global;
1070 execute dump_transactions_history;
1071 execute dump_accounts;
1072 execute dump_users;
1073 execute dump_hosts;
1074
1075 truncate performance_schema.events_transactions_summary_by_host_by_event_name;
1076
1077 echo "================== TRANSACTIONS_BY_HOST truncated ==================";
1078
1079 echo "================== Step 32 ==================";
1080 call dump_thread();
1081 execute dump_waits_account;
1082 execute dump_waits_user;
1083 execute dump_waits_host;
1084 execute dump_waits_global;
1085 execute dump_waits_history;
1086 execute dump_stages_account;
1087 execute dump_stages_user;
1088 execute dump_stages_host;
1089 execute dump_stages_global;
1090 execute dump_stages_history;
1091 execute dump_statements_account;
1092 execute dump_statements_user;
1093 execute dump_statements_host;
1094 execute dump_statements_global;
1095 execute dump_statements_history;
1096 execute dump_transactions_account;
1097 execute dump_transactions_user;
1098 execute dump_transactions_host;
1099 execute dump_transactions_global;
1100 execute dump_transactions_history;
1101 execute dump_accounts;
1102 execute dump_users;
1103 execute dump_hosts;
1104
1105 truncate performance_schema.events_transactions_summary_global_by_event_name;
1106
1107 echo "================== TRANSACTIONS_GLOBAL truncated ==================";
1108
1109 echo "================== Step 33 ==================";
1110 call dump_thread();
1111 execute dump_waits_account;
1112 execute dump_waits_user;
1113 execute dump_waits_host;
1114 execute dump_waits_global;
1115 execute dump_waits_history;
1116 execute dump_stages_account;
1117 execute dump_stages_user;
1118 execute dump_stages_host;
1119 execute dump_stages_global;
1120 execute dump_stages_history;
1121 execute dump_statements_account;
1122 execute dump_statements_user;
1123 execute dump_statements_host;
1124 execute dump_statements_global;
1125 execute dump_statements_history;
1126 execute dump_transactions_account;
1127 execute dump_transactions_user;
1128 execute dump_transactions_host;
1129 execute dump_transactions_global;
1130 execute dump_transactions_history;
1131 execute dump_accounts;
1132 execute dump_users;
1133 execute dump_hosts;
1134
1135 truncate performance_schema.accounts;
1136
1137 echo "================== ACCOUNTS truncated ==================";
1138
1139 echo "================== Step 34 ==================";
1140 call dump_thread();
1141 execute dump_waits_account;
1142 execute dump_waits_user;
1143 execute dump_waits_host;
1144 execute dump_waits_global;
1145 execute dump_waits_history;
1146 execute dump_stages_account;
1147 execute dump_stages_user;
1148 execute dump_stages_host;
1149 execute dump_stages_global;
1150 execute dump_stages_history;
1151 execute dump_statements_account;
1152 execute dump_statements_user;
1153 execute dump_statements_host;
1154 execute dump_statements_global;
1155 execute dump_statements_history;
1156 execute dump_transactions_account;
1157 execute dump_transactions_user;
1158 execute dump_transactions_host;
1159 execute dump_transactions_global;
1160 execute dump_transactions_history;
1161 execute dump_accounts;
1162 execute dump_users;
1163 execute dump_hosts;
1164
1165 truncate performance_schema.users;
1166
1167 echo "================== USERS truncated ==================";
1168
1169 echo "================== Step 35 ==================";
1170 call dump_thread();
1171 execute dump_waits_account;
1172 execute dump_waits_user;
1173 execute dump_waits_host;
1174 execute dump_waits_global;
1175 execute dump_waits_history;
1176 execute dump_stages_account;
1177 execute dump_stages_user;
1178 execute dump_stages_host;
1179 execute dump_stages_global;
1180 execute dump_stages_history;
1181 execute dump_statements_account;
1182 execute dump_statements_user;
1183 execute dump_statements_host;
1184 execute dump_statements_global;
1185 execute dump_statements_history;
1186 execute dump_transactions_account;
1187 execute dump_transactions_user;
1188 execute dump_transactions_host;
1189 execute dump_transactions_global;
1190 execute dump_transactions_history;
1191 execute dump_accounts;
1192 execute dump_users;
1193 execute dump_hosts;
1194
1195 truncate performance_schema.hosts;
1196
1197 echo "================== HOSTS truncated ==================";
1198
1199 echo "================== Step 36 ==================";
1200 call dump_thread();
1201 execute dump_waits_account;
1202 execute dump_waits_user;
1203 execute dump_waits_host;
1204 execute dump_waits_global;
1205 execute dump_waits_history;
1206 execute dump_stages_account;
1207 execute dump_stages_user;
1208 execute dump_stages_host;
1209 execute dump_stages_global;
1210 execute dump_stages_history;
1211 execute dump_statements_account;
1212 execute dump_statements_user;
1213 execute dump_statements_host;
1214 execute dump_statements_global;
1215 execute dump_statements_history;
1216 execute dump_transactions_account;
1217 execute dump_transactions_user;
1218 execute dump_transactions_host;
1219 execute dump_transactions_global;
1220 execute dump_transactions_history;
1221 execute dump_accounts;
1222 execute dump_users;
1223 execute dump_hosts;
1224