Skip to content

Commit 71f53bf

Browse files
committed
MDEV-11221 - main.events_restart failed in bb
This is an addition to original fix. Buildbot revealed another sporadic failure in perfschema.threads_mysql test. Tests relies on data stored in performance_schema.threads, while performing waits on information_schema.processlist. These tables are not updated synchronously. Fixed by performing waits on performance_schema.threads instead.
1 parent c1c5b7a commit 71f53bf

File tree

3 files changed

+23
-15
lines changed

3 files changed

+23
-15
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# threads are removed from:
2+
# - information_schema.processlist
3+
# - performance_schema.threads
4+
# at different times, so we may have to wait a little more
5+
# for the event_scheduler to shutdown
6+
#
7+
let $wait_condition=
8+
SELECT COUNT(*) = 0 FROM performance_schema.threads
9+
WHERE name like 'thread/sql/event%';
10+
--source include/wait_condition.inc
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# threads are removed from:
2+
# - information_schema.processlist
3+
# - performance_schema.threads
4+
# at different times, so we may have to wait a little more
5+
# for the event_scheduler to shutdown
6+
#
7+
let $wait_condition=
8+
SELECT COUNT(*) = 1 FROM performance_schema.threads
9+
WHERE name like 'thread/sql/event%';
10+
--source include/wait_condition.inc

mysql-test/suite/perfschema/t/threads_mysql.test

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,10 @@
99

1010
# Ensure that the event scheduler (started via threads_mysql-master.opt)
1111
# is really running.
12-
--source include/running_event_scheduler.inc
12+
--source include/pfs_running_event_scheduler.inc
1313

1414
SET GLOBAL event_scheduler = OFF;
15-
--source include/no_running_event_scheduler.inc
16-
17-
# threads are removed from:
18-
# - information_schema.processlist
19-
# - performance_schema.threads
20-
# at different times, so we may have to wait a little more
21-
# for the event_scheduler to shutdown
22-
#
23-
let $wait_timeout= 1;
24-
let $wait_condition=
25-
SELECT COUNT(*) = 0 FROM performance_schema.threads
26-
WHERE name like 'thread/sql/event%';
27-
--source include/wait_condition.inc
15+
--source include/pfs_no_running_event_scheduler.inc
2816

2917
--vertical_results
3018

@@ -59,7 +47,7 @@ WHERE name LIKE 'thread/sql%';
5947

6048

6149
SET GLOBAL event_scheduler = ON;
62-
--source include/running_event_scheduler.inc
50+
--source include/pfs_running_event_scheduler.inc
6351

6452
# Show entries belonging to the just started event scheduler
6553
SELECT name, type, processlist_user, processlist_host, processlist_db,

0 commit comments

Comments
 (0)