Debian Codegraph @

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

raw
1 # Tests for PERFORMANCE_SCHEMA
2
3 # Verify that the configuration options were applied correctly to the
4 # performance_schema.setup_instruments table. These instruments that are known to persist across
5 # platforms and the various compile options.
6
7 --echo #
8 --echo # Verify that the configuration file defaults were processed correctly
9 --echo #
10
11 SELECT * FROM performance_schema.setup_instruments
12 WHERE name IN (
13 'wait/synch/mutex/sql/LOCK_user_conn',
14 'wait/synch/mutex/sql/LOCK_uuid_generator',
15 'wait/synch/mutex/sql/LOCK_transaction_cache',
16 'stage/sql/creating table')
17 AND enabled = 'yes' AND timed = 'no'
18 ORDER BY name;
19
20 SELECT * FROM performance_schema.setup_instruments
21 WHERE name = 'wait/synch/mutex/sql/LOCK_thd_list'
22 AND enabled = 'no' AND timed = 'no';
23
24 SELECT * FROM performance_schema.setup_instruments
25 WHERE name IN (
26 'wait/synch/mutex/sql/LOG_INFO::lock',
27 'wait/synch/mutex/sql/THD::LOCK_thd_list')
28 AND enabled = 'yes' AND timed = 'yes'
29 ORDER BY name;
30
31 SELECT * FROM performance_schema.setup_instruments
32 WHERE name = 'wait/synch/mutex/sql/hash_filo::lock'
33 AND enabled = 'no' AND timed = 'no'
34 ORDER BY name;
35
36 --echo #
37 --echo # Verify that the memory instruments are never timed
38 --echo #
39 SELECT * FROM performance_schema.setup_instruments
40 WHERE name like 'memory/%'
41 AND timed = 'YES';
42
43 --echo #
44 --echo # Verify that the memory/performance_schema instruments are never disabled
45 --echo #
46 SELECT * FROM performance_schema.setup_instruments
47 WHERE name like 'memory/performance_schema/%'
48 AND enabled = 'NO';
49
50
51 --echo #
52 --echo # Verify that the instrument startup settings are not not visible.
53 --echo #
54 SHOW VARIABLES LIKE "%/wait/synch/mutex%";
55
56 --echo #
57 --echo # Verify command line options are processed correctly
58 --echo #
59
60 # The instrument wait/io/table/sql/handler should be enabled and timed.
61 --echo #
62 --echo # Verify that wait/io/table/sql/handler is enabled and timed
63 --echo #
64 SELECT * FROM performance_schema.setup_instruments
65 WHERE name like "%wait/io/table/sql/handler%";
66
67 --echo #
68 --echo # Verify that stored programs micro instructions are documented
69 --echo #
70
71 # Note, we don't test ENABLED and TIMED, because the test suite
72 # enables all instruments anyway in default_mysqld.cnf.
73
74 SELECT NAME, DOCUMENTATION FROM performance_schema.setup_instruments
75 WHERE NAME like "statement/sp/%" ORDER BY NAME;