diff options
Diffstat (limited to 'mysql-test/suite/perfschema/include/wait_till_sleep.inc')
-rw-r--r-- | mysql-test/suite/perfschema/include/wait_till_sleep.inc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/suite/perfschema/include/wait_till_sleep.inc b/mysql-test/suite/perfschema/include/wait_till_sleep.inc new file mode 100644 index 00000000..5f0f8594 --- /dev/null +++ b/mysql-test/suite/perfschema/include/wait_till_sleep.inc @@ -0,0 +1,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; +} + |