Debian Codegraph @

mysql-test/suite/sysschema/t/pr_ps_setup_show_enabled.test

raw
1 -- source include/not_embedded.inc
2 -- source include/have_innodb.inc
3
4 # Add to users to the setup_actors table: one enabled, and one disabled
5 INSERT INTO performance_schema.setup_actors
6 VALUES ('localhost', 'foo', '%', 'YES', 'YES'),
7 ('localhost', 'bar', '%', 'NO', 'NO');
8
9 # Disable all but a few instruments (reduces output as well)
10 # It is not possible to disable memory/performance_schema/%
11 # so don't even try.
12 UPDATE performance_schema.setup_instruments
13 SET ENABLED = 'NO'
14 WHERE NAME NOT LIKE 'memory/performance_schema/%'
15 AND NAME NOT LIKE 'stage/innodb/%'
16 AND NAME NOT LIKE 'statement/com/%'
17 AND NAME <> 'idle';
18
19 # Disable the history_long consumers:
20 UPDATE performance_schema.setup_consumers
21 SET ENABLED = 'NO'
22 WHERE NAME LIKE '%\_history\_long';
23
24 # Disable some of the background threads (including those that differ between unix like and Windows systems):
25 UPDATE performance_schema.threads
26 SET INSTRUMENTED = 'NO'
27 WHERE NAME LIKE 'thread/innodb/srv\_%'
28 OR NAME LIKE '%con\_%'
29 OR NAME LIKE '%signal_handler%'
30 OR NAME LIKE '%worker%'
31 OR (NAME='thread/sql/one_connection' AND PROCESSLIST_ID!=CONNECTION_ID());
32
33 # Show limited info (no thread or instrument info)
34 CALL sys.ps_setup_show_enabled(FALSE, FALSE);
35
36 # Should show instrument data, but not thread info
37 CALL sys.ps_setup_show_enabled(TRUE, FALSE);
38
39 # Should show thread info, but no instrument data
40 CALL sys.ps_setup_show_enabled(FALSE, TRUE);
41
42 # Should show all info
43 CALL sys.ps_setup_show_enabled(TRUE, TRUE);
44
45 # Clean up
46 -- source ../include/ps_setup_reset_to_default_cleanup.inc