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