config root man

Current Path : /usr/opt/mysql57/mysql-test/suite/sysschema/t/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //usr/opt/mysql57/mysql-test/suite/sysschema/t/fn_ps_is_consumer_enabled.test

-- source include/not_embedded.inc
# Tests for sys schema
# Verify the sys.ps_is_consumer_enabled() function perfoms as expected

# Should be disabled by default
UPDATE performance_schema.setup_consumers SET enabled = 'NO' WHERE name = 'events_stages_history';
SELECT sys.ps_is_consumer_enabled('events_stages_history');

# Should be enabled by default
SELECT sys.ps_is_consumer_enabled('global_instrumentation');

#
# Check that hierarchy is properly reflected
#

UPDATE performance_schema.setup_consumers SET enabled = 'NO' WHERE name = 'events_stages_current';
UPDATE performance_schema.setup_consumers SET enabled = 'YES' WHERE name = 'events_stages_history';

# Should still be disabled, as events_stages_current not enabled
SELECT sys.ps_is_consumer_enabled('events_stages_history');

UPDATE performance_schema.setup_consumers SET enabled = 'YES' WHERE name = 'events_stages_current';

# Now it should be enabled
SELECT sys.ps_is_consumer_enabled('events_stages_history');

# Toggling global_instrumentation should disable all other consumers
UPDATE performance_schema.setup_consumers SET enabled = 'NO' WHERE name = 'global_instrumentation';

SELECT sys.ps_is_consumer_enabled('thread_instrumentation');
SELECT sys.ps_is_consumer_enabled('statements_digest');
SELECT sys.ps_is_consumer_enabled('events_stages_current');
SELECT sys.ps_is_consumer_enabled('events_stages_history');
SELECT sys.ps_is_consumer_enabled('events_stages_history_long');
SELECT sys.ps_is_consumer_enabled('events_statements_current');
SELECT sys.ps_is_consumer_enabled('events_statements_history');
SELECT sys.ps_is_consumer_enabled('events_statements_history_long');

--source ../include/ps_setup_consumers_cleanup.inc

Man Man