diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2018-12-06 19:26:00 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2018-12-06 21:46:14 +0100 |
commit | 2a2e8ea8fe9a3421e04e0a03f712083f6ddec63c (patch) | |
tree | 355d453a41a2b513c49e5856bc79e154801f3fd1 | |
parent | 6491c591b26b61a99fd4279d65b93d277083c4c7 (diff) | |
download | mariadb-git-2a2e8ea8fe9a3421e04e0a03f712083f6ddec63c.tar.gz |
MDEV-17917 MTR: fixed race conditions in perfschema.socket_connect, main.connect
-rw-r--r-- | mysql-test/suite/perfschema/r/socket_connect.result | 13 | ||||
-rw-r--r-- | mysql-test/suite/perfschema/t/socket_connect.test | 9 | ||||
-rw-r--r-- | mysql-test/t/connect.test | 7 |
3 files changed, 8 insertions, 21 deletions
diff --git a/mysql-test/suite/perfschema/r/socket_connect.result b/mysql-test/suite/perfschema/r/socket_connect.result index 10540fd3071..4b77b3e0a82 100644 --- a/mysql-test/suite/perfschema/r/socket_connect.result +++ b/mysql-test/suite/perfschema/r/socket_connect.result @@ -159,19 +159,6 @@ Expect 1 # 6.1 Verify that there are no TCP/IP connections in the socket instance table -SELECT COUNT(*) = 0 AS 'Expect 1' -FROM performance_schema.socket_instances -WHERE EVENT_NAME LIKE '%client_connection%' - AND OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin -AND (IP LIKE '%127.0.0.1' OR IP LIKE '%::1'); -Expect 1 -1 # 6.2 Verify that there are no TCP/IP connections in the summary instance table -SELECT COUNT(*) = 0 AS 'Expect 1' -FROM performance_schema.socket_summary_by_instance -WHERE EVENT_NAME LIKE '%client_connection%' - AND OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin; -Expect 1 -1 diff --git a/mysql-test/suite/perfschema/t/socket_connect.test b/mysql-test/suite/perfschema/t/socket_connect.test index 909840144ef..b4579605eb5 100644 --- a/mysql-test/suite/perfschema/t/socket_connect.test +++ b/mysql-test/suite/perfschema/t/socket_connect.test @@ -273,18 +273,21 @@ WHERE EVENT_NAME LIKE '%client_connection%' --echo --echo # 6.1 Verify that there are no TCP/IP connections in the socket instance table --echo -eval SELECT COUNT(*) = 0 AS 'Expect 1' +let $wait_condition= +SELECT COUNT(*) = 0 AS 'Expect 1' FROM performance_schema.socket_instances WHERE EVENT_NAME LIKE '%client_connection%' AND OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin AND $ip_localhost; +--source include/wait_condition.inc --echo --echo # 6.2 Verify that there are no TCP/IP connections in the summary instance table --echo -eval SELECT COUNT(*) = 0 AS 'Expect 1' +let $wait_condition= +SELECT COUNT(*) = 0 AS 'Expect 1' FROM performance_schema.socket_summary_by_instance WHERE EVENT_NAME LIKE '%client_connection%' AND OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin; - +--source include/wait_condition.inc exit; diff --git a/mysql-test/t/connect.test b/mysql-test/t/connect.test index c2d44c08e22..3a38ad88462 100644 --- a/mysql-test/t/connect.test +++ b/mysql-test/t/connect.test @@ -253,11 +253,8 @@ let $wait_condition = --echo --echo # -- Waiting for connections to close... -let $wait_condition = - SELECT COUNT(*) = 1 - FROM information_schema.processlist - WHERE db = 'test'; ---source include/wait_condition.inc +let $count_sessions=1; +--source include/wait_until_count_sessions.inc --echo DROP USER mysqltest_u1@localhost; |