Commit 1e7fed72 authored by Daniel Black's avatar Daniel Black

mtr: perfschema.socket_{connect,instances_func} "Expect X"

Match test output with what it is testing.
parent d2dce1c9
...@@ -135,21 +135,21 @@ connection default; ...@@ -135,21 +135,21 @@ connection default;
# #
# 4.1 Verify that there are two TCP/IP connections in the socket instance table # 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 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 LIKE '%127.0.0.1' OR IP LIKE '%::1'); AND (IP LIKE '%127.0.0.1' OR IP LIKE '%::1');
Expect 1 Expect 2
1 1
# #
# 4.2 Verify that there are two TCP/IP connections in the summary instance table # 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 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;
Expect 1 Expect 2
1 1
#============================================================================== #==============================================================================
# 5.0 Drop the client connections # 5.0 Drop the client connections
......
...@@ -83,10 +83,10 @@ Expect 1 ...@@ -83,10 +83,10 @@ Expect 1
# There are two entries with 'wait/io/socket/sql/server_tcpip_socket', # There are two entries with 'wait/io/socket/sql/server_tcpip_socket',
# for [::] and for 0.0.0.0. # for [::] and for 0.0.0.0.
# They share the same thread id with 'wait/io/socket/sql/server_unix_socket'. # 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 FROM performance_schema.socket_instances
WHERE EVENT_NAME = 'wait/io/socket/sql/server_tcpip_socket'; WHERE EVENT_NAME = 'wait/io/socket/sql/server_tcpip_socket';
Expect 1 Expect 2
1 1
# Get the 'server_tcpip_socket' thread id # Get the 'server_tcpip_socket' thread id
SELECT DISTINCT THREAD_ID INTO @thread_id SELECT DISTINCT THREAD_ID INTO @thread_id
...@@ -125,15 +125,15 @@ WHERE EVENT_NAME = 'wait/io/socket/sql/server_unix_socket'; ...@@ -125,15 +125,15 @@ WHERE EVENT_NAME = 'wait/io/socket/sql/server_unix_socket';
Expect 1 Expect 1
1 1
# Server listening sockets (TCP and Unix) are handled on the same thread # 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 FROM performance_schema.socket_instances
WHERE THREAD_ID = @thread_id; WHERE THREAD_ID = @thread_id;
Expect 1 Expect 3
1 1
SELECT COUNT(*) = 3 AS 'Expect 1' SELECT COUNT(*) = 3 AS 'Expect 3'
FROM performance_schema.socket_instances FROM performance_schema.socket_instances
WHERE THREAD_ID = @thread_id; WHERE THREAD_ID = @thread_id;
Expect 1 Expect 3
1 1
#Compare server listener socket thread ids #Compare server listener socket thread ids
select @match_thread_id; select @match_thread_id;
......
...@@ -237,7 +237,7 @@ WHERE EVENT_NAME LIKE '%client_connection%' ...@@ -237,7 +237,7 @@ WHERE EVENT_NAME LIKE '%client_connection%'
--echo # --echo #
--echo # 4.1 Verify that there are two TCP/IP connections in the socket instance table --echo # 4.1 Verify that there are two TCP/IP connections in the socket instance table
--echo # --echo #
eval SELECT COUNT(*) = 2 AS 'Expect 1' eval SELECT COUNT(*) = 2 AS 'Expect 2'
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
...@@ -246,7 +246,7 @@ WHERE EVENT_NAME LIKE '%client_connection%' ...@@ -246,7 +246,7 @@ WHERE EVENT_NAME LIKE '%client_connection%'
--echo # --echo #
--echo # 4.2 Verify that there are two TCP/IP connections in the summary instance table --echo # 4.2 Verify that there are two TCP/IP connections in the summary instance table
--echo # --echo #
eval SELECT COUNT(*) = 2 AS 'Expect 1' eval SELECT COUNT(*) = 2 AS 'Expect 2'
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;
...@@ -274,7 +274,7 @@ WHERE EVENT_NAME LIKE '%client_connection%' ...@@ -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 # 6.1 Verify that there are no TCP/IP connections in the socket instance table
--echo # --echo #
let $wait_condition= let $wait_condition=
SELECT COUNT(*) = 0 AS 'Expect 1' SELECT COUNT(*) = 0 AS 'Expect 0'
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
...@@ -285,7 +285,7 @@ WHERE EVENT_NAME LIKE '%client_connection%' ...@@ -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 # 6.2 Verify that there are no TCP/IP connections in the summary instance table
--echo # --echo #
let $wait_condition= let $wait_condition=
SELECT COUNT(*) = 0 AS 'Expect 1' SELECT COUNT(*) = 0 AS 'Expect 0'
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;
......
...@@ -230,7 +230,7 @@ AND PORT = 0 AND THREAD_ID = @thread_id; ...@@ -230,7 +230,7 @@ AND PORT = 0 AND THREAD_ID = @thread_id;
--echo # for [::] and for 0.0.0.0. --echo # for [::] and for 0.0.0.0.
--echo # They share the same thread id with 'wait/io/socket/sql/server_unix_socket'. --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 FROM performance_schema.socket_instances
WHERE EVENT_NAME = 'wait/io/socket/sql/server_tcpip_socket'; WHERE EVENT_NAME = 'wait/io/socket/sql/server_tcpip_socket';
...@@ -293,14 +293,14 @@ WHERE EVENT_NAME = 'wait/io/socket/sql/server_unix_socket'; ...@@ -293,14 +293,14 @@ WHERE EVENT_NAME = 'wait/io/socket/sql/server_unix_socket';
--disable_query_log ONCE --disable_query_log ONCE
eval SET @thread_id = $server_tcpip_thread_id; 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 FROM performance_schema.socket_instances
WHERE THREAD_ID = @thread_id; WHERE THREAD_ID = @thread_id;
--disable_query_log ONCE --disable_query_log ONCE
eval SET @thread_id = $server_unix_thread_id; 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 FROM performance_schema.socket_instances
WHERE THREAD_ID = @thread_id; WHERE THREAD_ID = @thread_id;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment