1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-17917 MTR: fixed race conditions in perfschema.socket_connect, main.connect

This commit is contained in:
Vladislav Vaintroub
2018-12-06 19:26:00 +01:00
parent 6491c591b2
commit 2a2e8ea8fe
3 changed files with 8 additions and 21 deletions

View File

@ -159,19 +159,6 @@ Expect 1
# 6.1 Verify that there are no TCP/IP connections in the socket instance table # 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 # 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

View File

@ -273,18 +273,21 @@ WHERE EVENT_NAME LIKE '%client_connection%'
--echo --echo
--echo # 6.1 Verify that there are no TCP/IP connections in the socket instance table --echo # 6.1 Verify that there are no TCP/IP connections in the socket instance table
--echo --echo
eval SELECT COUNT(*) = 0 AS 'Expect 1' let $wait_condition=
SELECT COUNT(*) = 0 AS 'Expect 1'
FROM performance_schema.socket_instances FROM performance_schema.socket_instances
WHERE EVENT_NAME LIKE '%client_connection%' WHERE EVENT_NAME LIKE '%client_connection%'
AND OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin AND OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin
AND $ip_localhost; AND $ip_localhost;
--source include/wait_condition.inc
--echo --echo
--echo # 6.2 Verify that there are no TCP/IP connections in the summary instance table --echo # 6.2 Verify that there are no TCP/IP connections in the summary instance table
--echo --echo
eval SELECT COUNT(*) = 0 AS 'Expect 1' let $wait_condition=
SELECT COUNT(*) = 0 AS 'Expect 1'
FROM performance_schema.socket_summary_by_instance FROM performance_schema.socket_summary_by_instance
WHERE EVENT_NAME LIKE '%client_connection%' WHERE EVENT_NAME LIKE '%client_connection%'
AND OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin; AND OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin;
--source include/wait_condition.inc
exit; exit;

View File

@ -253,11 +253,8 @@ let $wait_condition =
--echo --echo
--echo # -- Waiting for connections to close... --echo # -- Waiting for connections to close...
let $wait_condition = let $count_sessions=1;
SELECT COUNT(*) = 1 --source include/wait_until_count_sessions.inc
FROM information_schema.processlist
WHERE db = 'test';
--source include/wait_condition.inc
--echo --echo
DROP USER mysqltest_u1@localhost; DROP USER mysqltest_u1@localhost;