mariadb/mysql-test/suite/perfschema/r/global_read_lock.result
Marc Alff 67a48e1a4c WL#2360 Performance schema
Part V: performance schema implementation
2010-01-11 18:47:27 -07:00

33 lines
1.3 KiB
Text

use performance_schema;
grant SELECT, UPDATE, LOCK TABLES on performance_schema.* to pfsuser@localhost;
flush privileges;
connect (con1, localhost, pfsuser, , test);
lock tables performance_schema.SETUP_INSTRUMENTS read;
select * from performance_schema.SETUP_INSTRUMENTS;
unlock tables;
lock tables performance_schema.SETUP_INSTRUMENTS write;
update performance_schema.SETUP_INSTRUMENTS set enabled='NO';
update performance_schema.SETUP_INSTRUMENTS set enabled='YES';
unlock tables;
connection default;
flush tables with read lock;
connection con1;
lock tables performance_schema.SETUP_INSTRUMENTS read;
select * from performance_schema.SETUP_INSTRUMENTS;
unlock tables;
lock tables performance_schema.SETUP_INSTRUMENTS write;
connection default;
select event_name,
left(source, locate(":", source)) as short_source,
timer_end, timer_wait, operation
from performance_schema.EVENTS_WAITS_CURRENT
where event_name like "wait/synch/cond/sql/COND_global_read_lock";
event_name short_source timer_end timer_wait operation
wait/synch/cond/sql/COND_global_read_lock lock.cc: NULL NULL wait
unlock tables;
update performance_schema.SETUP_INSTRUMENTS set enabled='NO';
update performance_schema.SETUP_INSTRUMENTS set enabled='YES';
unlock tables;
connection default;
drop user pfsuser@localhost;
flush privileges;