1# Tests for PERFORMANCE_SCHEMA 2 3--source include/not_embedded.inc 4--source include/have_perfschema.inc 5 6# Verify that the configuration options were applied correctly to the 7# performance_schema.setup_instruments table. These instruments that are known to persist across 8# platforms and the various compile options. 9 10--echo # 11--echo # Verify that the configuration file defaults were processed correctly 12--echo # 13 14SELECT * FROM performance_schema.setup_instruments 15WHERE name IN ( 16 'wait/synch/mutex/sql/LOCK_user_conn', 17 'wait/synch/mutex/sql/LOCK_uuid_generator', 18 'wait/synch/mutex/sql/LOCK_xid_cache', 19 'stage/sql/creating table') 20AND enabled = 'yes' AND timed = 'no' 21ORDER BY name; 22 23SELECT * FROM performance_schema.setup_instruments 24WHERE name = 'wait/synch/mutex/sql/LOCK_thread_count' 25AND enabled = 'no' AND timed = 'no'; 26 27SELECT * FROM performance_schema.setup_instruments 28WHERE name IN ( 29 'wait/synch/mutex/sql/LOG_INFO::lock', 30 'wait/synch/mutex/sql/THD::LOCK_thd_data') 31AND enabled = 'yes' AND timed = 'yes' 32ORDER BY name; 33 34SELECT * FROM performance_schema.setup_instruments 35WHERE name = 'wait/synch/mutex/sql/hash_filo::lock' 36AND enabled = 'no' AND timed = 'no' 37ORDER BY name; 38 39--echo # 40--echo # Verify that the instrument startup settings are not not visible. 41--echo # 42SHOW VARIABLES LIKE "%/wait/synch/mutex%"; 43 44--echo # 45--echo # Verify command line options are processed correctly 46--echo # 47 48# The instrument wait/io/table/sql/handler should be enabled and timed. We will 49# restart the server with the instrument disabled from the command line. 50--echo # 51--echo # Verify that wait/io/table/sql/handler is enabled and timed 52--echo # 53SELECT * FROM performance_schema.setup_instruments 54WHERE name like "%wait/io/table/sql/handler%"; 55 56--let $restart_parameters= restart:--loose-performance-schema-instrument='%wait/io/table/sql/%=off' 57--source include/restart_mysqld.inc 58 59--echo # 60--echo # Verify that wait/io/table is disabled 61--echo # 62SELECT * FROM performance_schema.setup_instruments 63WHERE name like "%wait/io/table/sql/handler%"; 64