# Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc --source include/have_perfschema.inc --source include/have_timer_cycle.inc # Set to a known state update performance_schema.setup_timers set timer_name='CYCLE' where name="wait"; update performance_schema.setup_timers set timer_name='NANOSECOND' where name="stage"; update performance_schema.setup_timers set timer_name='NANOSECOND' where name="statement"; update performance_schema.setup_timers set timer_name='MICROSECOND' where name="transaction"; update performance_schema.setup_timers set timer_name='MICROSECOND' where name="idle"; select * from performance_schema.setup_timers; select * from performance_schema.setup_timers where name='Wait'; select * from performance_schema.setup_timers where timer_name='CYCLE'; --error ER_TABLEACCESS_DENIED_ERROR insert into performance_schema.setup_timers set name='FOO', timer_name='CYCLE'; --error ER_WRONG_PERFSCHEMA_USAGE update performance_schema.setup_timers set name='FOO'; update performance_schema.setup_timers set timer_name='MILLISECOND'; select * from performance_schema.setup_timers; update performance_schema.setup_timers set timer_name='CYCLE'; --error ER_TABLEACCESS_DENIED_ERROR delete from performance_schema.setup_timers; --error ER_TABLEACCESS_DENIED_ERROR delete from performance_schema.setup_timers where name='Wait'; LOCK TABLES performance_schema.setup_timers READ; UNLOCK TABLES; LOCK TABLES performance_schema.setup_timers WRITE; UNLOCK TABLES; # Cleanup, restore the default values update performance_schema.setup_timers set timer_name='CYCLE' where name="wait"; update performance_schema.setup_timers set timer_name='NANOSECOND' where name="stage"; update performance_schema.setup_timers set timer_name='NANOSECOND' where name="statement"; update performance_schema.setup_timers set timer_name='MICROSECOND' where name="transaction"; update performance_schema.setup_timers set timer_name='MICROSECOND' where name="idle"; select * from performance_schema.setup_timers; --echo # --echo # MDEV-25325 column_comment for performance_schema tables --echo # select column_name, column_comment from information_schema.columns where table_schema='performance_schema' and table_name='setup_timers';