Debian Codegraph @

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

raw
1 # Tests for PERFORMANCE_SCHEMA
2
3 # The query result are not re producible,
4 # due to variations in platforms and plugins
5 # We still execute the select statement, for:
6 # - code coverage
7 # - make sure it does not crash
8 # - valgrind coverage
9
10 --disable_result_log
11 select * from performance_schema.setup_threads;
12 --enable_result_log
13
14 select * from performance_schema.setup_threads
15 order by name limit 12;
16
17 --disable_result_log
18 select * from performance_schema.setup_threads
19 where enabled='YES';
20 --enable_result_log
21
22 --error ER_TABLEACCESS_DENIED_ERROR
23 insert into performance_schema.setup_threads
24 set name='FOO', enabled='YES', history='YES';
25
26 --error ER_WRONG_PERFSCHEMA_USAGE
27 update performance_schema.setup_threads
28 set name='FOO';
29
30 --error ER_WRONG_PERFSCHEMA_USAGE
31 update performance_schema.setup_threads
32 set properties='user';
33
34 --error ER_WRONG_PERFSCHEMA_USAGE
35 update performance_schema.setup_threads
36 set volatility=666;
37
38 --error ER_WRONG_PERFSCHEMA_USAGE
39 update performance_schema.setup_threads
40 set documentation='Bar';
41
42 update performance_schema.setup_threads
43 set enabled='NO';
44
45 update performance_schema.setup_threads
46 set history='NO';
47
48 update performance_schema.setup_threads
49 set enabled='YES', history='YES';
50
51 --error ER_TABLEACCESS_DENIED_ERROR
52 delete from performance_schema.setup_threads;
53
54 --error ER_TABLEACCESS_DENIED_ERROR
55 delete from performance_schema.setup_threads
56 where name like 'thread/%';
57
58 LOCK TABLES performance_schema.setup_threads READ;
59 UNLOCK TABLES;
60
61 LOCK TABLES performance_schema.setup_threads WRITE;
62 UNLOCK TABLES;
63
64 UPDATE performance_schema.setup_threads SET history='NO'
65 ORDER BY RAND();
66
67 # Test cleanup
68
69 update performance_schema.setup_threads
70 set enabled='YES', history='YES';
71