summaryrefslogtreecommitdiff
path: root/mysql-test/suite/perfschema/include/wait_till_sleep.inc
blob: 5f0f85948c7fb5024fc273da18b1d25de58e8cd8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Wait till the action of the connection using the DB = 'mysqltest' or
# 'mysqlsupertest' is finished ( Command = 'Sleep').

let $wait_timeout= 10;
let $wait_condition=
SELECT COUNT(*) = 1
FROM performance_schema.threads
WHERE processlist_db IN ('mysqltest','mysqlsupertest')
  AND processlist_command = 'Sleep';
--source include/wait_condition.inc
if (!$success)
{
   --echo # Error: We did not reach the expected state where processlist_command = 'Sleep'
   SELECT * FROM performance_schema.threads
   WHERE processlist_db IN ('mysqltest','mysqlsupertest');
   --echo # abort
   exit;
}