mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
59dd58b17e
A few tests assumes that the CYCLE timer is always available, which is not true on some platforms (e.g. ARM). Fixing the tests not to reply on the CYCLE availability.
66 lines
1.8 KiB
Text
66 lines
1.8 KiB
Text
# 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="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="idle";
|
|
|
|
select * from performance_schema.setup_timers;
|
|
|