Debian Codegraph @

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

raw
1 # Tests for PERFORMANCE_SCHEMA
2
3 --disable_result_log
4 select * from performance_schema.table_io_waits_summary_by_index_usage
5 limit 1;
6
7 select * from performance_schema.table_io_waits_summary_by_index_usage
8 where object_name='FOO';
9 --enable_result_log
10
11 --error ER_TABLEACCESS_DENIED_ERROR
12 insert into performance_schema.table_io_waits_summary_by_index_usage
13 set object_type='TABLE', object_name='FOO', object_schema='BAR',
14 count_star=1, sum_timer_wait=2, min_timer_wait=3,
15 avg_timer_wait=4, max_timer_wait=5;
16
17 --error ER_TABLEACCESS_DENIED_ERROR
18 update performance_schema.table_io_waits_summary_by_index_usage
19 set count_star=12;
20
21 --error ER_TABLEACCESS_DENIED_ERROR
22 update performance_schema.table_io_waits_summary_by_index_usage
23 set count_star=12 where object_name like "FOO";
24
25 --error ER_TABLEACCESS_DENIED_ERROR
26 delete from performance_schema.table_io_waits_summary_by_index_usage
27 where count_star=1;
28
29 --error ER_TABLEACCESS_DENIED_ERROR
30 delete from performance_schema.table_io_waits_summary_by_index_usage;
31
32 -- error ER_TABLEACCESS_DENIED_ERROR
33 LOCK TABLES performance_schema.table_io_waits_summary_by_index_usage READ;
34 UNLOCK TABLES;
35
36 -- error ER_TABLEACCESS_DENIED_ERROR
37 LOCK TABLES performance_schema.table_io_waits_summary_by_index_usage WRITE;
38 UNLOCK TABLES;
39
40
41 --echo #
42 --echo # WL#6599/BUG#23044286: New Data Dictionary and I_S Integration.
43 --echo #
44
45 CREATE TABLE test.t1(fld1 INT);
46 LOCK TABLE test.t1 WRITE;
47 ALTER TABLE test.t1 OPTIMIZE PARTITION ALL;
48 SELECT object_name FROM performance_schema.table_io_waits_summary_by_index_usage
49 WHERE object_schema= 'test';
50
51 --echo # Cleanup
52 UNLOCK TABLES;
53 DROP TABLE test.t1;