Debian Codegraph @

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

raw
1 # Tests for PERFORMANCE_SCHEMA
2
3 --disable_result_log
4 select * from performance_schema.threads
5 where name like 'Thread/%' limit 1;
6
7 select * from performance_schema.threads
8 where name='FOO';
9 --enable_result_log
10
11 --error ER_TABLEACCESS_DENIED_ERROR
12 insert into performance_schema.threads
13 set name='FOO', thread_id=1, processlist_id=2;
14
15 --error ER_WRONG_PERFSCHEMA_USAGE
16 update performance_schema.threads
17 set thread_id=12;
18
19 --error ER_WRONG_PERFSCHEMA_USAGE
20 update performance_schema.threads
21 set thread_id=12 where PROCESSLIST_ID=connection_id();
22
23 update performance_schema.threads
24 set instrumented= 'NO' where PROCESSLIST_ID=connection_id();
25
26 select instrumented from performance_schema.threads
27 where PROCESSLIST_ID=connection_id();
28
29 update performance_schema.threads
30 set instrumented= 'YES' where PROCESSLIST_ID=connection_id();
31
32 select instrumented from performance_schema.threads
33 where PROCESSLIST_ID=connection_id();
34
35 --error ER_WRONG_PERFSCHEMA_USAGE
36 update performance_schema.threads
37 set resource_group = 'FOO' where PROCESSLIST_ID=connection_id();
38
39 --error ER_WRONG_PERFSCHEMA_USAGE
40 update performance_schema.threads
41 set execution_engine='SECONDARY';
42
43 --error ER_TABLEACCESS_DENIED_ERROR
44 delete from performance_schema.threads
45 where id=1;
46
47 --error ER_TABLEACCESS_DENIED_ERROR
48 delete from performance_schema.threads;
49
50 LOCK TABLES performance_schema.threads READ;
51 UNLOCK TABLES;
52
53 LOCK TABLES performance_schema.threads WRITE;
54 UNLOCK TABLES;
55