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.
5 # Wait until there is only one session left, this one.
8 select count(*) = 1 from information_schema.processlist;
9 --source include/wait_condition.inc
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.
17 select count(*) <= 1 from performance_schema.threads
18 where `TYPE`=
'FOREGROUND';
19 --source include/wait_condition.inc