[Commits] 71f53bf: MDEV-11221 - main.events_restart failed in bb

Sergey Vojtovich svoj at mariadb.org
Thu Mar 2 10:41:23 EET 2017


revision-id: 71f53bf72d918d99910f4a3e8cadbd5ed98a3021 (mariadb-10.0.29-55-g71f53bf)
parent(s): c1c5b7a8d26b446db18c5d16aca523252e97d078
committer: Sergey Vojtovich
timestamp: 2017-03-02 12:35:31 +0400
message:

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.

---
 .../include/pfs_no_running_event_scheduler.inc         | 10 ++++++++++
 .../perfschema/include/pfs_running_event_scheduler.inc | 10 ++++++++++
 mysql-test/suite/perfschema/t/threads_mysql.test       | 18 +++---------------
 3 files changed, 23 insertions(+), 15 deletions(-)

diff --git a/mysql-test/suite/perfschema/include/pfs_no_running_event_scheduler.inc b/mysql-test/suite/perfschema/include/pfs_no_running_event_scheduler.inc
new file mode 100644
index 0000000..eff3d7d
--- /dev/null
+++ b/mysql-test/suite/perfschema/include/pfs_no_running_event_scheduler.inc
@@ -0,0 +1,10 @@
+# threads are removed from:
+# - information_schema.processlist
+# - performance_schema.threads
+# at different times, so we may have to wait a little more
+# for the event_scheduler to shutdown
+#
+let $wait_condition=
+  SELECT COUNT(*) = 0 FROM performance_schema.threads
+  WHERE name like 'thread/sql/event%';
+--source include/wait_condition.inc
diff --git a/mysql-test/suite/perfschema/include/pfs_running_event_scheduler.inc b/mysql-test/suite/perfschema/include/pfs_running_event_scheduler.inc
new file mode 100644
index 0000000..219a410
--- /dev/null
+++ b/mysql-test/suite/perfschema/include/pfs_running_event_scheduler.inc
@@ -0,0 +1,10 @@
+# threads are removed from:
+# - information_schema.processlist
+# - performance_schema.threads
+# at different times, so we may have to wait a little more
+# for the event_scheduler to shutdown
+#
+let $wait_condition=
+  SELECT COUNT(*) = 1 FROM performance_schema.threads
+  WHERE name like 'thread/sql/event%';
+--source include/wait_condition.inc
diff --git a/mysql-test/suite/perfschema/t/threads_mysql.test b/mysql-test/suite/perfschema/t/threads_mysql.test
index 8576c87..c33f421 100644
--- a/mysql-test/suite/perfschema/t/threads_mysql.test
+++ b/mysql-test/suite/perfschema/t/threads_mysql.test
@@ -9,22 +9,10 @@
 
 # Ensure that the event scheduler (started via threads_mysql-master.opt)
 # is really running.
---source include/running_event_scheduler.inc
+--source include/pfs_running_event_scheduler.inc
 
 SET GLOBAL event_scheduler = OFF;
---source include/no_running_event_scheduler.inc
-
-# threads are removed from:
-# - information_schema.processlist
-# - performance_schema.threads
-# at different times, so we may have to wait a little more
-# for the event_scheduler to shutdown
-#
-let $wait_timeout= 1;
-let $wait_condition=
-  SELECT COUNT(*) = 0 FROM performance_schema.threads
-  WHERE name like 'thread/sql/event%';
---source include/wait_condition.inc
+--source include/pfs_no_running_event_scheduler.inc
 
 --vertical_results
 
@@ -59,7 +47,7 @@ WHERE name LIKE 'thread/sql%';
 
 
 SET GLOBAL event_scheduler = ON;
---source include/running_event_scheduler.inc
+--source include/pfs_running_event_scheduler.inc
 
 # Show entries belonging to the just started event scheduler
 SELECT name, type, processlist_user, processlist_host, processlist_db,


More information about the commits mailing list