Debian Codegraph @

mysql-test/suite/perfschema/t/dml_threads.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.threads
8 where name like 'Thread/%' limit 1;
9
10 select * from performance_schema.threads
11 where name='FOO';
12 --enable_result_log
13
14 --error ER_TABLEACCESS_DENIED_ERROR
15 insert into performance_schema.threads
16 set name='FOO', thread_id=1, processlist_id=2;
17
18 --error ER_WRONG_PERFSCHEMA_USAGE
19 update performance_schema.threads
20 set thread_id=12;
21
22 --error ER_WRONG_PERFSCHEMA_USAGE
23 update performance_schema.threads
24 set thread_id=12 where PROCESSLIST_ID=connection_id();
25
26 update performance_schema.threads
27 set instrumented= 'NO' where PROCESSLIST_ID=connection_id();
28
29 select instrumented from performance_schema.threads
30 where PROCESSLIST_ID=connection_id();
31
32 update performance_schema.threads
33 set instrumented= 'YES' where PROCESSLIST_ID=connection_id();
34
35 select instrumented from performance_schema.threads
36 where PROCESSLIST_ID=connection_id();
37
38 --error ER_TABLEACCESS_DENIED_ERROR
39 delete from performance_schema.threads
40 where id=1;
41
42 --error ER_TABLEACCESS_DENIED_ERROR
43 delete from performance_schema.threads;
44
45 LOCK TABLES performance_schema.threads READ;
46 UNLOCK TABLES;
47
48 LOCK TABLES performance_schema.threads WRITE;
49 UNLOCK TABLES;
50
51 --echo #
52 --echo # MDEV-25325 column_comment for performance_schema tables
53 --echo #
54 select column_name, column_comment
55 from information_schema.columns
56 where table_schema='performance_schema' and table_name='threads';