mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-31005: Make working cursor-protocol
Updated tests: cases with bugs or which cannot be run with the cursor-protocol were excluded with "--disable_cursor_protocol"/"--enable_cursor_protocol" Fix for v.10.5
This commit is contained in:
@ -47,9 +47,11 @@ CREATE TEMPORARY TABLE my_socket_instances AS
|
||||
SELECT * FROM performance_schema.socket_instances;
|
||||
|
||||
--echo # Get thread id of the default connection
|
||||
--disable_cursor_protocol
|
||||
SELECT THREAD_ID INTO @thread_id
|
||||
FROM performance_schema.threads
|
||||
WHERE PROCESSLIST_ID = CONNECTION_ID();
|
||||
--enable_cursor_protocol
|
||||
|
||||
let $con0_thread_id= `SELECT @thread_id`;
|
||||
|
||||
@ -67,14 +69,18 @@ if($my_socket_debug)
|
||||
}
|
||||
|
||||
--echo # Store the thread id of connection 1 (tcp/ip)
|
||||
--disable_cursor_protocol
|
||||
SELECT THREAD_ID INTO @thread_id
|
||||
FROM performance_schema.threads
|
||||
WHERE PROCESSLIST_ID = CONNECTION_ID();
|
||||
--enable_cursor_protocol
|
||||
|
||||
--echo # Store the port of connection 1 (tcp/ip)
|
||||
--disable_cursor_protocol
|
||||
eval SELECT PORT INTO @port
|
||||
FROM performance_schema.socket_instances
|
||||
WHERE THREAD_ID = @thread_id;
|
||||
--enable_cursor_protocol
|
||||
|
||||
let $con1_thread_id= `SELECT @thread_id`;
|
||||
let $con1_port= `SELECT @port`;
|
||||
@ -95,14 +101,18 @@ if($my_socket_debug)
|
||||
}
|
||||
|
||||
--echo # Store the thread_id of connection 2 (tcp/ip)
|
||||
--disable_cursor_protocol
|
||||
SELECT THREAD_ID INTO @thread_id
|
||||
FROM performance_schema.threads
|
||||
WHERE PROCESSLIST_ID = CONNECTION_ID();
|
||||
--enable_cursor_protocol
|
||||
|
||||
--echo # Store the port of connection 2 (tcp/ip)
|
||||
--disable_cursor_protocol
|
||||
eval SELECT PORT INTO @port
|
||||
FROM performance_schema.socket_instances
|
||||
WHERE THREAD_ID = @thread_id;
|
||||
--enable_cursor_protocol
|
||||
|
||||
let $con2_thread_id= `SELECT @thread_id`;
|
||||
let $con2_port= `SELECT @port`;
|
||||
@ -123,14 +133,18 @@ if($my_socket_debug)
|
||||
}
|
||||
|
||||
--echo # Store the thread id of connection 3 (unix domain)
|
||||
--disable_cursor_protocol
|
||||
SELECT THREAD_ID INTO @thread_id
|
||||
FROM performance_schema.threads
|
||||
WHERE PROCESSLIST_ID = CONNECTION_ID();
|
||||
--enable_cursor_protocol
|
||||
|
||||
--echo # Store the port of connection 3 (unix domain)
|
||||
--disable_cursor_protocol
|
||||
eval SELECT PORT INTO @port
|
||||
FROM performance_schema.socket_instances
|
||||
WHERE THREAD_ID = @thread_id;
|
||||
--enable_cursor_protocol
|
||||
|
||||
let $con3_port= `SELECT @port`;
|
||||
let $con3_thread_id= `SELECT @thread_id`;
|
||||
@ -232,9 +246,11 @@ WHERE EVENT_NAME = 'wait/io/socket/sql/server_tcpip_socket';
|
||||
# Store the thread id of server_tcpip_socket
|
||||
--echo # Get the 'server_tcpip_socket' thread id
|
||||
|
||||
--disable_cursor_protocol
|
||||
SELECT THREAD_ID INTO @thread_id
|
||||
FROM performance_schema.socket_instances
|
||||
WHERE EVENT_NAME = 'wait/io/socket/sql/server_tcpip_socket';
|
||||
--enable_cursor_protocol
|
||||
|
||||
let $server_tcpip_thread_id= `SELECT @thread_id`;
|
||||
|
||||
@ -265,9 +281,11 @@ WHERE EVENT_NAME = 'wait/io/socket/sql/server_unix_socket';
|
||||
# Store the thread id of 'server_unix_socket'
|
||||
--echo # Get the 'server_unix_socket' thread id
|
||||
|
||||
--disable_cursor_protocol
|
||||
SELECT THREAD_ID INTO @thread_id
|
||||
FROM performance_schema.socket_instances
|
||||
WHERE EVENT_NAME = 'wait/io/socket/sql/server_unix_socket';
|
||||
--enable_cursor_protocol
|
||||
|
||||
let $server_unix_thread_id= `SELECT @thread_id`;
|
||||
|
||||
@ -301,7 +319,9 @@ WHERE THREAD_ID = @thread_id;
|
||||
|
||||
--echo #Compare server listener socket thread ids
|
||||
--disable_query_log ONCE
|
||||
--disable_cursor_protocol
|
||||
eval SELECT ($server_tcpip_thread_id = $server_unix_thread_id) into @match_thread_id;
|
||||
--disable_cursor_protocol
|
||||
|
||||
select @match_thread_id;
|
||||
|
||||
|
Reference in New Issue
Block a user