| 1 |
use performance_schema; |
| 2 |
update performance_schema.setup_instruments set enabled='YES'; |
| 3 |
create user pfsuser@localhost; |
| 4 |
grant SELECT, UPDATE, LOCK TABLES on performance_schema.* to pfsuser@localhost; |
| 5 |
flush privileges; |
| 6 |
connect (con1, localhost, pfsuser, , test); |
| 7 |
lock tables performance_schema.setup_instruments read; |
| 8 |
select * from performance_schema.setup_instruments; |
| 9 |
unlock tables; |
| 10 |
lock tables performance_schema.setup_instruments write; |
| 11 |
update performance_schema.setup_instruments set enabled='NO'; |
| 12 |
update performance_schema.setup_instruments set enabled='YES'; |
| 13 |
unlock tables; |
| 14 |
connection default; |
| 15 |
flush tables with read lock; |
| 16 |
connection con1; |
| 17 |
lock tables performance_schema.setup_instruments read; |
| 18 |
select * from performance_schema.setup_instruments; |
| 19 |
unlock tables; |
| 20 |
lock tables performance_schema.setup_instruments write; |
| 21 |
connection default; |
| 22 |
select event_name, |
| 23 |
left(source, locate(":", source)) as short_source, |
| 24 |
if(timer_end IS NULL, NULL, "SET") as timer_end, |
| 25 |
if(timer_wait IS NULL, NULL, "SET") as timer_wait, |
| 26 |
operation |
| 27 |
from performance_schema.events_waits_current |
| 28 |
where event_name like "wait/synch/cond/sql/MDL_context::COND_wait_status"; |
| 29 |
event_name short_source timer_end timer_wait operation |
| 30 |
wait/synch/cond/sql/MDL_context::COND_wait_status mdl.cc: SET SET timed_wait |
| 31 |
unlock tables; |
| 32 |
update performance_schema.setup_instruments set enabled='NO'; |
| 33 |
update performance_schema.setup_instruments set enabled='YES'; |
| 34 |
unlock tables; |
| 35 |
connection default; |
| 36 |
drop user pfsuser@localhost; |
| 37 |
flush privileges; |