| 1 |
# Tests for PERFORMANCE_SCHEMA |
| 2 |
|
| 3 |
let $MYSQLD_DATADIR= `select @@datadir`; |
| 4 |
let $MYSQLD_TMPDIR= `select @@tmpdir`; |
| 5 |
|
| 6 |
--disable_query_log |
| 7 |
update performance_schema.setup_instruments set enabled='NO'; |
| 8 |
update performance_schema.setup_consumers set enabled='YES'; |
| 9 |
--enable_query_log |
| 10 |
|
| 11 |
connect (con1, localhost, root, , ); |
| 12 |
|
| 13 |
let $con1_THREAD_ID=`select thread_id from performance_schema.threads |
| 14 |
where PROCESSLIST_ID = connection_id()`; |
| 15 |
|
| 16 |
connect (con2, localhost, root, , ); |
| 17 |
|
| 18 |
let $con2_THREAD_ID=`select thread_id from performance_schema.threads |
| 19 |
where PROCESSLIST_ID = connection_id()`; |
| 20 |
|
| 21 |
connect (con3, localhost, root, , ); |
| 22 |
|
| 23 |
let $con3_THREAD_ID=`select thread_id from performance_schema.threads |
| 24 |
where PROCESSLIST_ID = connection_id()`; |
| 25 |
|
| 26 |
connection default; |
| 27 |
|
| 28 |
--disable_query_log |
| 29 |
prepare stmt_dump_events from |
| 30 |
"select event_name, |
| 31 |
left(source, locate(\":\", source)) as short_source, |
| 32 |
operation, number_of_bytes |
| 33 |
from performance_schema.events_waits_history_long |
| 34 |
where thread_id=? order by event_id;"; |
| 35 |
|
| 36 |
prepare stmt_dump_thread from |
| 37 |
"select name from performance_schema.threads where thread_id=? ;"; |
| 38 |
--enable_query_log |
| 39 |
|