Debian Codegraph @

mysql-test/suite/perfschema/t/dml_ews_by_instance.test

raw
1 # Tests for PERFORMANCE_SCHEMA
2
3 --source include/not_embedded.inc
4 --source include/have_perfschema.inc
5
6 --disable_result_log
7 select * from performance_schema.events_waits_summary_by_instance
8 where event_name like 'Wait/Synch/%' limit 1;
9
10 select * from performance_schema.events_waits_summary_by_instance
11 where event_name='FOO';
12
13 select * from performance_schema.events_waits_summary_by_instance
14 order by count_star limit 1;
15
16 select * from performance_schema.events_waits_summary_by_instance
17 order by count_star desc limit 1;
18
19 select * from performance_schema.events_waits_summary_by_instance
20 where min_timer_wait > 0 order by count_star limit 1;
21
22 select * from performance_schema.events_waits_summary_by_instance
23 where min_timer_wait > 0 order by count_star desc limit 1;
24 --enable_result_log
25
26 --error ER_TABLEACCESS_DENIED_ERROR
27 insert into performance_schema.events_waits_summary_by_instance
28 set event_name='FOO', object_instance_begin=0,
29 count_star=1, sum_timer_wait=2, min_timer_wait=3,
30 avg_timer_wait=4, max_timer_wait=5;
31
32 --error ER_TABLEACCESS_DENIED_ERROR
33 update performance_schema.events_waits_summary_by_instance
34 set count_star=12;
35
36 --error ER_TABLEACCESS_DENIED_ERROR
37 update performance_schema.events_waits_summary_by_instance
38 set count_star=12 where event_name like "FOO";
39
40 --error ER_TABLEACCESS_DENIED_ERROR
41 delete from performance_schema.events_waits_summary_by_instance
42 where count_star=1;
43
44 --error ER_TABLEACCESS_DENIED_ERROR
45 delete from performance_schema.events_waits_summary_by_instance;
46
47 -- error ER_TABLEACCESS_DENIED_ERROR
48 LOCK TABLES performance_schema.events_waits_summary_by_instance READ;
49 UNLOCK TABLES;
50
51 -- error ER_TABLEACCESS_DENIED_ERROR
52 LOCK TABLES performance_schema.events_waits_summary_by_instance WRITE;
53 UNLOCK TABLES;
54
55 --echo #
56 --echo # MDEV-25325 column_comment for performance_schema tables
57 --echo #
58 select column_name, column_comment
59 from information_schema.columns
60 where table_schema='performance_schema' and table_name='events_waits_summary_by_instance';