From 1e7fed721bda1fce2e956d3576339e71923f3688 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Thu, 4 Mar 2021 12:12:24 +1100 Subject: [PATCH] mtr: perfschema.socket_{connect,instances_func} "Expect X" Match test output with what it is testing. --- mysql-test/suite/perfschema/r/socket_connect.result | 8 ++++---- .../suite/perfschema/r/socket_instances_func.result | 12 ++++++------ mysql-test/suite/perfschema/t/socket_connect.test | 8 ++++---- .../suite/perfschema/t/socket_instances_func.test | 6 +++--- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/mysql-test/suite/perfschema/r/socket_connect.result b/mysql-test/suite/perfschema/r/socket_connect.result index b729b7b3840..b33ee6f2951 100644 --- a/mysql-test/suite/perfschema/r/socket_connect.result +++ b/mysql-test/suite/perfschema/r/socket_connect.result @@ -135,21 +135,21 @@ connection default; # # 4.1 Verify that there are two TCP/IP connections in the socket instance table # -SELECT COUNT(*) = 2 AS 'Expect 1' +SELECT COUNT(*) = 2 AS 'Expect 2' 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 +Expect 2 1 # # 4.2 Verify that there are two TCP/IP connections in the summary instance table # -SELECT COUNT(*) = 2 AS 'Expect 1' +SELECT COUNT(*) = 2 AS 'Expect 2' FROM performance_schema.socket_summary_by_instance WHERE EVENT_NAME LIKE '%client_connection%' AND OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin; -Expect 1 +Expect 2 1 #============================================================================== # 5.0 Drop the client connections diff --git a/mysql-test/suite/perfschema/r/socket_instances_func.result b/mysql-test/suite/perfschema/r/socket_instances_func.result index 28643ca07e8..2f215ca6414 100644 --- a/mysql-test/suite/perfschema/r/socket_instances_func.result +++ b/mysql-test/suite/perfschema/r/socket_instances_func.result @@ -83,10 +83,10 @@ Expect 1 # There are two entries with 'wait/io/socket/sql/server_tcpip_socket', # for [::] and for 0.0.0.0. # They share the same thread id with 'wait/io/socket/sql/server_unix_socket'. -SELECT COUNT(*) = 2 AS 'Expect 1' +SELECT COUNT(*) = 2 AS 'Expect 2' FROM performance_schema.socket_instances WHERE EVENT_NAME = 'wait/io/socket/sql/server_tcpip_socket'; -Expect 1 +Expect 2 1 # Get the 'server_tcpip_socket' thread id SELECT DISTINCT THREAD_ID INTO @thread_id @@ -125,15 +125,15 @@ WHERE EVENT_NAME = 'wait/io/socket/sql/server_unix_socket'; Expect 1 1 # Server listening sockets (TCP and Unix) are handled on the same thread -SELECT COUNT(*) = 3 AS 'Expect 1' +SELECT COUNT(*) = 3 AS 'Expect 3' FROM performance_schema.socket_instances WHERE THREAD_ID = @thread_id; -Expect 1 +Expect 3 1 -SELECT COUNT(*) = 3 AS 'Expect 1' +SELECT COUNT(*) = 3 AS 'Expect 3' FROM performance_schema.socket_instances WHERE THREAD_ID = @thread_id; -Expect 1 +Expect 3 1 #Compare server listener socket thread ids select @match_thread_id; diff --git a/mysql-test/suite/perfschema/t/socket_connect.test b/mysql-test/suite/perfschema/t/socket_connect.test index 4ae9608cd0e..8290e289df1 100644 --- a/mysql-test/suite/perfschema/t/socket_connect.test +++ b/mysql-test/suite/perfschema/t/socket_connect.test @@ -237,7 +237,7 @@ WHERE EVENT_NAME LIKE '%client_connection%' --echo # --echo # 4.1 Verify that there are two TCP/IP connections in the socket instance table --echo # -eval SELECT COUNT(*) = 2 AS 'Expect 1' +eval SELECT COUNT(*) = 2 AS 'Expect 2' FROM performance_schema.socket_instances WHERE EVENT_NAME LIKE '%client_connection%' AND OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin @@ -246,7 +246,7 @@ WHERE EVENT_NAME LIKE '%client_connection%' --echo # --echo # 4.2 Verify that there are two TCP/IP connections in the summary instance table --echo # -eval SELECT COUNT(*) = 2 AS 'Expect 1' +eval SELECT COUNT(*) = 2 AS 'Expect 2' FROM performance_schema.socket_summary_by_instance WHERE EVENT_NAME LIKE '%client_connection%' AND OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin; @@ -274,7 +274,7 @@ WHERE EVENT_NAME LIKE '%client_connection%' --echo # 6.1 Verify that there are no TCP/IP connections in the socket instance table --echo # let $wait_condition= -SELECT COUNT(*) = 0 AS 'Expect 1' +SELECT COUNT(*) = 0 AS 'Expect 0' FROM performance_schema.socket_instances WHERE EVENT_NAME LIKE '%client_connection%' AND OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin @@ -285,7 +285,7 @@ WHERE EVENT_NAME LIKE '%client_connection%' --echo # 6.2 Verify that there are no TCP/IP connections in the summary instance table --echo # let $wait_condition= -SELECT COUNT(*) = 0 AS 'Expect 1' +SELECT COUNT(*) = 0 AS 'Expect 0' FROM performance_schema.socket_summary_by_instance WHERE EVENT_NAME LIKE '%client_connection%' AND OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin; diff --git a/mysql-test/suite/perfschema/t/socket_instances_func.test b/mysql-test/suite/perfschema/t/socket_instances_func.test index 27f0b3983c0..7e8dfe51d2f 100644 --- a/mysql-test/suite/perfschema/t/socket_instances_func.test +++ b/mysql-test/suite/perfschema/t/socket_instances_func.test @@ -230,7 +230,7 @@ AND PORT = 0 AND THREAD_ID = @thread_id; --echo # for [::] and for 0.0.0.0. --echo # They share the same thread id with 'wait/io/socket/sql/server_unix_socket'. -SELECT COUNT(*) = 2 AS 'Expect 1' +SELECT COUNT(*) = 2 AS 'Expect 2' FROM performance_schema.socket_instances WHERE EVENT_NAME = 'wait/io/socket/sql/server_tcpip_socket'; @@ -293,14 +293,14 @@ WHERE EVENT_NAME = 'wait/io/socket/sql/server_unix_socket'; --disable_query_log ONCE eval SET @thread_id = $server_tcpip_thread_id; -eval SELECT COUNT(*) = 3 AS 'Expect 1' +eval SELECT COUNT(*) = 3 AS 'Expect 3' FROM performance_schema.socket_instances WHERE THREAD_ID = @thread_id; --disable_query_log ONCE eval SET @thread_id = $server_unix_thread_id; -eval SELECT COUNT(*) = 3 AS 'Expect 1' +eval SELECT COUNT(*) = 3 AS 'Expect 3' FROM performance_schema.socket_instances WHERE THREAD_ID = @thread_id;