Debian Codegraph @

mysql-test/suite/x/t/performance_schema.test

raw
1 ## Tests detecting presence of xplugin objects in PERFORMANCE_SCHEMA.
2
3 ## Preamble
4 --source ../include/have_performance_schema_threads.inc
5 --source include/xplugin_preamble.inc
6 --source include/xplugin_create_user.inc
7
8 # Tests
9 --write_file $MYSQL_TMP_DIR/performance_schema.xpl
10 -->quiet
11 -->sql
12 update performance_schema.setup_instruments set ENABLED='YES' where NAME like '%mysqlx%';
13
14 update performance_schema.setup_instruments set ENABLED='NO' where NAME like 'wait/synch/mutex/mysqlx/lock_list_access';
15 update performance_schema.setup_instruments set ENABLED='NO' where NAME like 'wait/synch/mutex/mysqlx/scheduler_dynamic_worker_pending';
16 update performance_schema.setup_instruments set ENABLED='NO' where NAME like 'wait/synch/cond/mysqlx/scheduler_dynamic_worker_pending';
17
18 update performance_schema.setup_consumers set ENABLED='YES' where NAME like 'events_waits%';
19
20 TRUNCATE TABLE performance_schema.events_waits_history_long;
21 TRUNCATE TABLE performance_schema.events_waits_history;
22
23 SELECT DISTINCT name FROM performance_schema.threads WHERE name
24 LIKE 'thread/mysqlx/%' ORDER BY name;
25
26 SELECT DISTINCT name FROM performance_schema.mutex_instances WHERE name
27 LIKE 'wait/synch/mutex/mysqlx/%' AND name NOT LIKE '%unix%' ORDER BY name;
28
29 SELECT DISTINCT name FROM performance_schema.cond_instances WHERE name
30 LIKE 'wait/synch/cond/mysqlx/%' AND name NOT LIKE '%unix%' ORDER BY name;
31
32 SELECT DISTINCT name FROM performance_schema.rwlock_instances WHERE name
33 LIKE 'wait/synch/rwlock/mysqlx/%' AND name NOT LIKE '%unix%' ORDER BY name;
34
35 SELECT * FROM performance_schema.setup_instruments WHERE name like '%mysqlx%'
36 AND name NOT LIKE '%unix%';
37
38
39 # Threads Table Functional Scenario
40 ##########################################################################
41 update performance_schema.threads
42 set instrumented= 'NO' where PROCESSLIST_ID=connection_id();
43
44 select instrumented from performance_schema.threads
45 where PROCESSLIST_ID=connection_id();
46
47 update performance_schema.threads
48 set instrumented= 'YES' where PROCESSLIST_ID=connection_id();
49
50 select instrumented from performance_schema.threads
51 where PROCESSLIST_ID=connection_id();
52
53 LOCK TABLES performance_schema.threads READ;
54 UNLOCK TABLES;
55
56 LOCK TABLES performance_schema.threads WRITE;
57 UNLOCK TABLES;
58
59
60 ###########################################################################
61 # DDL and DML Error Scenarios
62 ###########################################################################
63
64 # DDL Operations Check
65 ###########################################################################
66 # error ER_DBACCESS_DENIED_ERROR
67 -->endsql
68 -->expecterror ER_DBACCESS_DENIED_ERROR
69 -->sql
70 alter table performance_schema.mutex_instances add column foo integer;
71 -->endsql
72 -->expecterror ER_DBACCESS_DENIED_ERROR
73 -->sql
74 alter table performance_schema.cond_instances add column foo integer;
75 -->endsql
76 -->expecterror ER_DBACCESS_DENIED_ERROR
77 -->sql
78 alter table performance_schema.threads add column foo integer;
79 -->endsql
80 -->expecterror ER_DBACCESS_DENIED_ERROR
81 -->sql
82 alter table performance_schema.rwlock_instances add column foo integer;
83 -->endsql
84 -->expecterror ER_DBACCESS_DENIED_ERROR
85 -->sql
86 alter table performance_schema.socket_instances add column foo integer;
87 -->endsql
88 -->expecterror ER_DBACCESS_DENIED_ERROR
89 -->sql
90 alter table performance_schema.socket_summary_by_event_name add column foo integer;
91 -->endsql
92 -->expecterror ER_DBACCESS_DENIED_ERROR
93 -->sql
94 alter table performance_schema.socket_summary_by_instance add column foo integer;
95
96 -->endsql
97 -->expecterror ER_TABLEACCESS_DENIED_ERROR
98 -->sql
99 truncate table performance_schema.mutex_instances;
100 -->endsql
101 -->expecterror ER_TABLEACCESS_DENIED_ERROR
102 -->sql
103 truncate table performance_schema.cond_instances;
104 -->endsql
105 -->expecterror ER_TABLEACCESS_DENIED_ERROR
106 -->sql
107 truncate table performance_schema.threads;
108 -->endsql
109 -->expecterror ER_TABLEACCESS_DENIED_ERROR
110 -->sql
111 truncate table performance_schema.rwlock_instances;
112 -->endsql
113 -->expecterror ER_TABLEACCESS_DENIED_ERROR
114 -->sql
115 truncate table performance_schema.socket_instances;
116 -->endsql
117 -->sql
118 truncate table performance_schema.socket_summary_by_event_name;
119 -->endsql
120 -->sql
121 truncate table performance_schema.socket_summary_by_instance;
122 -->endsql
123 -->expecterror ER_DBACCESS_DENIED_ERROR
124 -->sql
125 ALTER TABLE performance_schema.mutex_instances ADD INDEX test_index(NAME);
126 -->endsql
127 -->expecterror ER_DBACCESS_DENIED_ERROR
128 -->sql
129 ALTER TABLE performance_schema.cond_instances ADD INDEX test_index(NAME);
130 -->endsql
131 -->expecterror ER_DBACCESS_DENIED_ERROR
132 -->sql
133 ALTER TABLE performance_schema.threads ADD INDEX test_index(PROCESSLIST_ID);
134 -->endsql
135 -->expecterror ER_DBACCESS_DENIED_ERROR
136 -->sql
137 ALTER TABLE performance_schema.rwlock_instances ADD INDEX test_index(NAME);
138 -->endsql
139 -->expecterror ER_DBACCESS_DENIED_ERROR
140 -->sql
141 ALTER TABLE performance_schema.rwlock_instances ADD INDEX socket_instances(STATE);
142 -->endsql
143 -->expecterror ER_DBACCESS_DENIED_ERROR
144 -->sql
145 ALTER TABLE performance_schema.rwlock_instances ADD INDEX socket_summary_by_event_name(EVENT_NAME);
146 -->endsql
147 -->expecterror ER_DBACCESS_DENIED_ERROR
148 -->sql
149 ALTER TABLE performance_schema.rwlock_instances ADD INDEX socket_summary_by_instance(EVENT_NAME);
150
151 # error ER_DBACCESS_DENIED_ERROR
152 -->endsql
153 -->expecterror ER_DBACCESS_DENIED_ERROR
154 -->sql
155 CREATE UNIQUE INDEX test_index ON performance_schema.mutex_instances(NAME);
156 -->endsql
157 -->expecterror ER_DBACCESS_DENIED_ERROR
158 -->sql
159 CREATE UNIQUE INDEX test_index ON performance_schema.cond_instances(NAME);
160 -->endsql
161 -->expecterror ER_DBACCESS_DENIED_ERROR
162 -->sql
163 CREATE UNIQUE INDEX test_index ON performance_schema.threads(PROCESSLIST_ID);
164 -->endsql
165 -->expecterror ER_DBACCESS_DENIED_ERROR
166 -->sql
167 CREATE UNIQUE INDEX test_index ON performance_schema.rwlock_instances(NAME);
168 -->endsql
169 -->expecterror ER_DBACCESS_DENIED_ERROR
170 -->sql
171 CREATE UNIQUE INDEX test_index ON performance_schema.socket_instances(STATE);
172 -->endsql
173 -->expecterror ER_DBACCESS_DENIED_ERROR
174 -->sql
175 CREATE UNIQUE INDEX test_index ON performance_schema.socket_summary_by_event_name(EVENT_NAME);
176 -->endsql
177 -->expecterror ER_DBACCESS_DENIED_ERROR
178 -->sql
179 CREATE UNIQUE INDEX test_index ON performance_schema.socket_summary_by_instance(EVENT_NAME);
180
181 # DML Operations Check
182 ###########################################################################
183 # error ER_TABLEACCESS_DENIED_ERROR
184 -->endsql
185 -->expecterror ER_TABLEACCESS_DENIED_ERROR
186 -->sql
187 insert into performance_schema.mutex_instances
188 set name='FOO', object_instance_begin=12;
189 -->endsql
190 -->expecterror ER_TABLEACCESS_DENIED_ERROR
191 -->sql
192 insert into performance_schema.cond_instances
193 set name='FOO', object_instance_begin=12;
194 -->endsql
195 -->expecterror ER_TABLEACCESS_DENIED_ERROR
196 -->sql
197 insert into performance_schema.threads
198 set name='FOO', thread_id=1, processlist_id=2;
199 -->endsql
200 -->expecterror ER_TABLEACCESS_DENIED_ERROR
201 -->sql
202 insert into performance_schema.rwlock_instances
203 set name='FOO', object_instance_begin=12;
204 -->endsql
205 -->expecterror ER_TABLEACCESS_DENIED_ERROR
206 -->sql
207 insert into performance_schema.socket_instances
208 set ip='', port=12;
209 -->endsql
210 -->expecterror ER_TABLEACCESS_DENIED_ERROR
211 -->sql
212 insert into performance_schema.socket_summary_by_event_name
213 set event_name='FOO', count_read=12;
214 -->endsql
215 -->expecterror ER_TABLEACCESS_DENIED_ERROR
216 -->sql
217 insert into performance_schema.socket_summary_by_instance
218 set event_name='FOO', count_misc=12;
219
220 # error ER_TABLEACCESS_DENIED_ERROR
221 -->endsql
222 -->expecterror ER_TABLEACCESS_DENIED_ERROR
223 -->sql
224 update performance_schema.mutex_instances
225 set name='FOO';
226 -->endsql
227 -->expecterror ER_TABLEACCESS_DENIED_ERROR
228 -->sql
229 update performance_schema.cond_instances
230 set name='FOO';
231 -->endsql
232 -->expecterror ER_WRONG_PERFSCHEMA_USAGE
233 -->sql
234 update performance_schema.threads
235 set thread_id=12 where PROCESSLIST_ID=connection_id();
236 -->endsql
237 -->expecterror ER_WRONG_PERFSCHEMA_USAGE
238 -->sql
239 update performance_schema.threads
240 set thread_id=12;
241 -->endsql
242 -->expecterror ER_TABLEACCESS_DENIED_ERROR
243 -->sql
244 update performance_schema.rwlock_instances
245 set name='FOO';
246 -->endsql
247 -->expecterror ER_TABLEACCESS_DENIED_ERROR
248 -->sql
249 update performance_schema.socket_instances
250 set ip='FOO';
251 -->endsql
252 -->expecterror ER_TABLEACCESS_DENIED_ERROR
253 -->sql
254 update performance_schema.socket_summary_by_event_name
255 set event_name='FOO';
256 -->endsql
257 -->expecterror ER_TABLEACCESS_DENIED_ERROR
258 -->sql
259 update performance_schema.socket_summary_by_instance
260 set event_name='FOO';
261
262 # error ER_TABLEACCESS_DENIED_ERROR
263 -->endsql
264 -->expecterror ER_TABLEACCESS_DENIED_ERROR
265 -->sql
266 delete from performance_schema.mutex_instances
267 where name like "wait/%";
268 -->endsql
269 -->expecterror ER_TABLEACCESS_DENIED_ERROR
270 -->sql
271 delete from performance_schema.cond_instances
272 where name like "wait/%";
273 -->endsql
274 -->expecterror ER_TABLEACCESS_DENIED_ERROR
275 -->sql
276 delete from performance_schema.threads
277 where id=1;
278 -->endsql
279 -->expecterror ER_TABLEACCESS_DENIED_ERROR
280 -->sql
281 delete from performance_schema.rwlock_instances
282 where name like "wait/%";
283 -->endsql
284 -->expecterror ER_TABLEACCESS_DENIED_ERROR
285 -->sql
286 delete from performance_schema.socket_instances
287 where event_name like "wait/%";
288 -->endsql
289 -->expecterror ER_TABLEACCESS_DENIED_ERROR
290 -->sql
291 delete from performance_schema.socket_summary_by_event_name
292 where event_name like "wait/%";
293 -->endsql
294 -->expecterror ER_TABLEACCESS_DENIED_ERROR
295 -->sql
296 delete from performance_schema.socket_summary_by_instance
297 where event_name like "wait/%";
298
299 # error ER_TABLEACCESS_DENIED_ERROR
300 -->endsql
301 -->expecterror ER_TABLEACCESS_DENIED_ERROR
302 -->sql
303 delete from performance_schema.mutex_instances;
304 -->endsql
305 -->expecterror ER_TABLEACCESS_DENIED_ERROR
306 -->sql
307 delete from performance_schema.cond_instances;
308 -->endsql
309 -->expecterror ER_TABLEACCESS_DENIED_ERROR
310 -->sql
311 delete from performance_schema.threads;
312 -->endsql
313 -->expecterror ER_TABLEACCESS_DENIED_ERROR
314 -->sql
315 delete from performance_schema.rwlock_instances;
316 -->endsql
317 -->expecterror ER_TABLEACCESS_DENIED_ERROR
318 -->sql
319 delete from performance_schema.socket_instances;
320 -->endsql
321 -->expecterror ER_TABLEACCESS_DENIED_ERROR
322 -->sql
323 delete from performance_schema.socket_summary_by_event_name;
324 -->endsql
325 -->expecterror ER_TABLEACCESS_DENIED_ERROR
326 -->sql
327 delete from performance_schema.socket_summary_by_instance;
328
329 # error ER_TABLEACCESS_DENIED_ERROR
330 -->endsql
331 -->expecterror ER_TABLEACCESS_DENIED_ERROR
332 -->sql
333 LOCK TABLES performance_schema.mutex_instances READ;
334 UNLOCK TABLES;
335 -->endsql
336 -->expecterror ER_TABLEACCESS_DENIED_ERROR
337 -->sql
338 LOCK TABLES performance_schema.cond_instances READ;
339 UNLOCK TABLES;
340 -->endsql
341 -->expecterror ER_TABLEACCESS_DENIED_ERROR
342 -->sql
343 LOCK TABLES performance_schema.rwlock_instances READ;
344 UNLOCK TABLES;
345 -->endsql
346 -->expecterror ER_TABLEACCESS_DENIED_ERROR
347 -->sql
348 LOCK TABLES performance_schema.socket_instances READ;
349 UNLOCK TABLES;
350 -->endsql
351 -->expecterror ER_TABLEACCESS_DENIED_ERROR
352 -->sql
353 LOCK TABLES performance_schema.socket_summary_by_event_name READ;
354 UNLOCK TABLES;
355 -->endsql
356 -->expecterror ER_TABLEACCESS_DENIED_ERROR
357 -->sql
358 LOCK TABLES performance_schema.socket_summary_by_instance READ;
359 UNLOCK TABLES;
360
361 # error ER_TABLEACCESS_DENIED_ERROR
362 -->endsql
363 -->expecterror ER_TABLEACCESS_DENIED_ERROR
364 -->sql
365 LOCK TABLES performance_schema.mutex_instances WRITE;
366 UNLOCK TABLES;
367 -->endsql
368 -->expecterror ER_TABLEACCESS_DENIED_ERROR
369 -->sql
370 LOCK TABLES performance_schema.cond_instances WRITE;
371 UNLOCK TABLES;
372 -->endsql
373 -->expecterror ER_TABLEACCESS_DENIED_ERROR
374 -->sql
375 LOCK TABLES performance_schema.rwlock_instances WRITE;
376 UNLOCK TABLES;
377 -->endsql
378 -->expecterror ER_TABLEACCESS_DENIED_ERROR
379 -->sql
380 LOCK TABLES performance_schema.socket_instances WRITE;
381 UNLOCK TABLES;
382 -->endsql
383 -->expecterror ER_TABLEACCESS_DENIED_ERROR
384 -->sql
385 LOCK TABLES performance_schema.socket_summary_by_event_name WRITE;
386 UNLOCK TABLES;
387 -->endsql
388 -->expecterror ER_TABLEACCESS_DENIED_ERROR
389 -->sql
390 LOCK TABLES performance_schema.socket_summary_by_instance WRITE;
391 UNLOCK TABLES;
392 -->endsql
393
394 # Checking the tables with Mysql Crud Find
395 #================================================
396
397 Mysqlx.Crud.Find {
398 collection {
399 name: "threads"
400 schema: "performance_schema"
401 }
402 data_model: TABLE
403 projection {
404 source {
405 type: FUNC_CALL
406 function_call {
407 name {
408 name: "DISTINCT"
409 }
410 param {
411 type: IDENT
412 identifier {
413 name: "name"
414 }
415 }
416 }
417 }
418 alias: "name"
419 }
420 criteria {
421 type: OPERATOR
422 operator {
423 name: "like"
424 param {
425 type: IDENT
426 identifier {
427 name: "name"
428 }
429 }
430 param {
431 type: LITERAL
432 literal {
433 type: V_OCTETS
434 v_octets {value:"%mysqlx%"}
435 }
436 }
437 }
438 }
439 order {
440 expr {
441 type: IDENT
442 identifier {
443 name: "name"
444 }
445 }
446 }
447 }
448 -->recvresult
449
450 Mysqlx.Crud.Find {
451 collection {
452 name: "mutex_instances"
453 schema: "performance_schema"
454 }
455 data_model: TABLE
456 projection {
457 source {
458 type: FUNC_CALL
459 function_call {
460 name {
461 name: "DISTINCT"
462 }
463 param {
464 type: IDENT
465 identifier {
466 name: "name"
467 }
468 }
469 }
470 }
471 alias: "name"
472 }
473 criteria {
474 type: OPERATOR
475 operator {
476 name: "&&"
477 param {
478 type: OPERATOR
479 operator {
480 name: "like"
481 param {
482 type: IDENT
483 identifier {
484 name: "name"
485 }
486 }
487 param {
488 type: LITERAL
489 literal {
490 type: V_OCTETS
491 v_octets {value:"%mysqlx%"}
492 }
493 }
494 }
495 }
496 param {
497 type: OPERATOR
498 operator {
499 name: "not_like"
500 param {
501 type: IDENT
502 identifier {
503 name: "name"
504 }
505 }
506 param {
507 type: LITERAL
508 literal {
509 type: V_OCTETS
510 v_octets {value:"%unix%"}
511 }
512 }
513 }
514 }
515 }
516 }
517 order {
518 expr {
519 type: IDENT
520 identifier {
521 name: "name"
522 }
523 }
524 }
525 }
526 -->recvresult
527
528 Mysqlx.Crud.Find {
529 collection {
530 name: "cond_instances"
531 schema: "performance_schema"
532 }
533 data_model: TABLE
534 projection {
535 source {
536 type: FUNC_CALL
537 function_call {
538 name {
539 name: "DISTINCT"
540 }
541 param {
542 type: IDENT
543 identifier {
544 name: "name"
545 }
546 }
547 }
548 }
549 alias: "name"
550 }
551 criteria {
552 type: OPERATOR
553 operator {
554 name: "&&"
555 param {
556 type: OPERATOR
557 operator {
558 name: "like"
559 param {
560 type: IDENT
561 identifier {
562 name: "name"
563 }
564 }
565 param {
566 type: LITERAL
567 literal {
568 type: V_OCTETS
569 v_octets {value:"%mysqlx%"}
570 }
571 }
572 }
573 }
574 param {
575 type: OPERATOR
576 operator {
577 name: "not_like"
578 param {
579 type: IDENT
580 identifier {
581 name: "name"
582 }
583 }
584 param {
585 type: LITERAL
586 literal {
587 type: V_OCTETS
588 v_octets {value:"%unix%"}
589 }
590 }
591 }
592 }
593 }
594 }
595 order {
596 expr {
597 type: IDENT
598 identifier {
599 name: "name"
600 }
601 }
602 }
603 }
604 -->recvresult
605
606 Mysqlx.Crud.Find {
607 collection {
608 name: "rwlock_instances"
609 schema: "performance_schema"
610 }
611 data_model: TABLE
612 projection {
613 source {
614 type: FUNC_CALL
615 function_call {
616 name {
617 name: "DISTINCT"
618 }
619 param {
620 type: IDENT
621 identifier {
622 name: "name"
623 }
624 }
625 }
626 }
627 alias: "name"
628 }
629 criteria {
630 type: OPERATOR
631 operator {
632 name: "&&"
633 param {
634 type: OPERATOR
635 operator {
636 name: "like"
637 param {
638 type: IDENT
639 identifier {
640 name: "name"
641 }
642 }
643 param {
644 type: LITERAL
645 literal {
646 type: V_OCTETS
647 v_octets {value:"%mysqlx%"}
648 }
649 }
650 }
651 }
652 param {
653 type: OPERATOR
654 operator {
655 name: "not_like"
656 param {
657 type: IDENT
658 identifier {
659 name: "name"
660 }
661 }
662 param {
663 type: LITERAL
664 literal {
665 type: V_OCTETS
666 v_octets {value:"%unix%"}
667 }
668 }
669 }
670 }
671 }
672 }
673 order {
674 expr {
675 type: IDENT
676 identifier {
677 name: "name"
678 }
679 }
680 }
681 }
682 -->recvresult
683
684 Mysqlx.Crud.Find {
685 collection {
686 name: "socket_instances"
687 schema: "performance_schema"
688 }
689 data_model: TABLE
690 projection {
691 source {
692 type: FUNC_CALL
693 function_call {
694 name {
695 name: "DISTINCT"
696 }
697 param {
698 type: IDENT
699 identifier {
700 name: "event_name"
701 }
702 }
703 }
704 }
705 alias: "event_name"
706 }
707 criteria {
708 type: OPERATOR
709 operator {
710 name: "&&"
711 param {
712 type: OPERATOR
713 operator {
714 name: "like"
715 param {
716 type: IDENT
717 identifier {
718 name: "event_name"
719 }
720 }
721 param {
722 type: LITERAL
723 literal {
724 type: V_OCTETS
725 v_octets {value:"%mysqlx%"}
726 }
727 }
728 }
729 }
730 param {
731 type: OPERATOR
732 operator {
733 name: "not_like"
734 param {
735 type: IDENT
736 identifier {
737 name: "event_name"
738 }
739 }
740 param {
741 type: LITERAL
742 literal {
743 type: V_OCTETS
744 v_octets {value:"%unix%"}
745 }
746 }
747 }
748 }
749 }
750 }
751 order {
752 expr {
753 type: IDENT
754 identifier {
755 name: "event_name"
756 }
757 }
758 }
759 }
760 -->recvresult
761
762 Mysqlx.Crud.Find {
763 collection {
764 name: "socket_instances"
765 schema: "performance_schema"
766 }
767 data_model: TABLE
768 projection {
769 source {
770 type: FUNC_CALL
771 function_call {
772 name {
773 name: "DISTINCT"
774 }
775 param {
776 type: IDENT
777 identifier {
778 name: "event_name"
779 }
780 }
781 }
782 }
783 alias: "event_name"
784 }
785 criteria {
786 type: OPERATOR
787 operator {
788 name: "&&"
789 param {
790 type: OPERATOR
791 operator {
792 name: "like"
793 param {
794 type: IDENT
795 identifier {
796 name: "event_name"
797 }
798 }
799 param {
800 type: LITERAL
801 literal {
802 type: V_OCTETS
803 v_octets {value:"%mysqlx%"}
804 }
805 }
806 }
807 }
808 param {
809 type: OPERATOR
810 operator {
811 name: "not_like"
812 param {
813 type: IDENT
814 identifier {
815 name: "event_name"
816 }
817 }
818 param {
819 type: LITERAL
820 literal {
821 type: V_OCTETS
822 v_octets {value:"%unix%"}
823 }
824 }
825 }
826 }
827 }
828 }
829 order {
830 expr {
831 type: IDENT
832 identifier {
833 name: "event_name"
834 }
835 }
836 }
837 }
838 -->recvresult
839
840 Mysqlx.Crud.Find {
841 collection {
842 name: "socket_summary_by_event_name"
843 schema: "performance_schema"
844 }
845 data_model: TABLE
846 projection {
847 source {
848 type: FUNC_CALL
849 function_call {
850 name {
851 name: "DISTINCT"
852 }
853 param {
854 type: IDENT
855 identifier {
856 name: "event_name"
857 }
858 }
859 }
860 }
861 alias: "event_name"
862 }
863 criteria {
864 type: OPERATOR
865 operator {
866 name: "&&"
867 param {
868 type: OPERATOR
869 operator {
870 name: "like"
871 param {
872 type: IDENT
873 identifier {
874 name: "event_name"
875 }
876 }
877 param {
878 type: LITERAL
879 literal {
880 type: V_OCTETS
881 v_octets {value:"%mysqlx%"}
882 }
883 }
884 }
885 }
886 param {
887 type: OPERATOR
888 operator {
889 name: "not_like"
890 param {
891 type: IDENT
892 identifier {
893 name: "event_name"
894 }
895 }
896 param {
897 type: LITERAL
898 literal {
899 type: V_OCTETS
900 v_octets {value:"%unix%"}
901 }
902 }
903 }
904 }
905 }
906 }
907 order {
908 expr {
909 type: IDENT
910 identifier {
911 name: "event_name"
912 }
913 }
914 }
915 }
916 -->recvresult
917
918 Mysqlx.Crud.Find {
919 collection {
920 name: "socket_summary_by_instance"
921 schema: "performance_schema"
922 }
923 data_model: TABLE
924 projection {
925 source {
926 type: FUNC_CALL
927 function_call {
928 name {
929 name: "DISTINCT"
930 }
931 param {
932 type: IDENT
933 identifier {
934 name: "event_name"
935 }
936 }
937 }
938 }
939 alias: "event_name"
940 }
941 criteria {
942 type: OPERATOR
943 operator {
944 name: "&&"
945 param {
946 type: OPERATOR
947 operator {
948 name: "like"
949 param {
950 type: IDENT
951 identifier {
952 name: "event_name"
953 }
954 }
955 param {
956 type: LITERAL
957 literal {
958 type: V_OCTETS
959 v_octets {value:"%mysqlx%"}
960 }
961 }
962 }
963 }
964 param {
965 type: OPERATOR
966 operator {
967 name: "not_like"
968 param {
969 type: IDENT
970 identifier {
971 name: "event_name"
972 }
973 }
974 param {
975 type: LITERAL
976 literal {
977 type: V_OCTETS
978 v_octets {value:"%unix%"}
979 }
980 }
981 }
982 }
983 }
984 }
985 order {
986 expr {
987 type: IDENT
988 identifier {
989 name: "event_name"
990 }
991 }
992 }
993 }
994 -->recvresult
995
996 -->stmtadmin ping
997 -->stmtsql select sleep(1);
998 -->stmtadmin ping
999 -->stmtadmin ping
1000 -->recvresult
1001 -->recvresult
1002 -->recvresult
1003 -->recvresult
1004
1005 EOF
1006
1007
1008 --exec $MYSQLXTEST -ux_root --password='' --file=$MYSQL_TMP_DIR/performance_schema.xpl 2>&1
1009
1010 ## Needs rework
1011 ## select DISTINCT EVENT_NAME from performance_schema.events_waits_current
1012 ## where EVENT_NAME like '%mysqlx%' ORDER BY EVENT_NAME;
1013 select DISTINCT EVENT_NAME from performance_schema.events_waits_history
1014 where EVENT_NAME rlike '^wait/synch/mutex/mysqlx/(client_session|obuffer|queue)$' ORDER BY EVENT_NAME;
1015 select DISTINCT EVENT_NAME from performance_schema.events_waits_history_long
1016 where EVENT_NAME rlike '^wait/synch/(cond|mutex)/mysqlx/(queue|client_session|obuffer|queue)$' ORDER BY EVENT_NAME;
1017
1018
1019 ## Cleanup
1020 update performance_schema.setup_instruments set ENABLED='YES'
1021 where NAME rlike '^wait/synch/(cond|mutex)/mysqlx/(lock_list_access|scheduler_dynamic_worker_pending)$';
1022
1023 -- echo # Check if any classes are not lost, this may happen if they are already
1024 -- echo # just on the limit
1025 SELECT * FROM performance_schema.global_status
1026 WHERE variable_name LIKE '%_LOST' AND variable_value > 0;
1027
1028 --source ../include/xplugin_cleanup.inc