| 1 |
# Tests for the performance schema |
| 2 |
# This helper can be used to enforce that no threads from previous |
| 3 |
# tests are still running, which can impact some test scripts. |
| 4 |
|
| 5 |
# Wait until there is only one session left, this one. |
| 6 |
|
| 7 |
let $wait_condition= |
| 8 |
select count(*) = 2 from information_schema.processlist; |
| 9 |
--source include/wait_condition.inc |
| 10 |
|
| 11 |
# Threads are removed from information_schema.processlist |
| 12 |
# very soon, but continue to execute in the server, |
| 13 |
# before finally be removed from performance_schema.threads. |
| 14 |
# Because instrumentation is optional, we use "<=" here. |
| 15 |
|
| 16 |
let $wait_condition= |
| 17 |
select count(*) <= 3 from performance_schema.threads |
| 18 |
where `TYPE`='FOREGROUND'; |
| 19 |
--source include/wait_condition.inc |
| 20 |
|