Debian Codegraph @

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

raw
1 # Tests for PERFORMANCE_SCHEMA
2
3 --disable_result_log
4 select * from performance_schema.events_statements_history
5 where event_name like 'statement/%' limit 1;
6
7 select * from performance_schema.events_statements_history
8 where event_name='FOO';
9
10 select * from performance_schema.events_statements_history
11 where event_name like 'statement/%' order by timer_wait limit 1;
12
13 select * from performance_schema.events_statements_history
14 where event_name like 'statement/%' order by timer_wait desc limit 1;
15 --enable_result_log
16
17 --error ER_TABLEACCESS_DENIED_ERROR
18 insert into performance_schema.events_statements_history
19 set thread_id='1', event_id=1,
20 event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
21
22 --error ER_TABLEACCESS_DENIED_ERROR
23 update performance_schema.events_statements_history
24 set timer_start=12;
25
26 --error ER_TABLEACCESS_DENIED_ERROR
27 update performance_schema.events_statements_history
28 set timer_start=12 where thread_id=0;
29
30 --error ER_TABLEACCESS_DENIED_ERROR
31 delete from performance_schema.events_statements_history
32 where thread_id=1;
33
34 --error ER_TABLEACCESS_DENIED_ERROR
35 delete from performance_schema.events_statements_history;
36
37 -- error ER_TABLEACCESS_DENIED_ERROR
38 LOCK TABLES performance_schema.events_statements_history READ;
39 UNLOCK TABLES;
40
41 -- error ER_TABLEACCESS_DENIED_ERROR
42 LOCK TABLES performance_schema.events_statements_history WRITE;
43 UNLOCK TABLES;
44