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

Merge 11.2 into 11.4

This commit is contained in:
Marko Mäkelä
2024-10-03 14:32:14 +03:00
560 changed files with 5796 additions and 1398 deletions

View File

@ -34,9 +34,11 @@ update performance_schema.threads
truncate table performance_schema.events_statements_history_long;
truncate table performance_schema.events_stages_history_long;
--disable_cursor_protocol
--disable_query_log
eval select $con1_THREAD_ID into @con1_thread_id;
--enable_query_log
--enable_cursor_protocol
--connection con1
@ -52,10 +54,12 @@ SET DEBUG_SYNC='copy_data_between_tables_before SIGNAL found_row WAIT_FOR wait_r
SET DEBUG_SYNC='now WAIT_FOR found_row';
# Find the statement id of the ALTER TABLE
--disable_cursor_protocol
--enable_prepare_warnings
select event_id from performance_schema.events_statements_current
where thread_id = @con1_thread_id into @con1_stmt_id;
--disable_prepare_warnings
--enable_cursor_protocol
# completed 0
select EVENT_NAME, WORK_COMPLETED, WORK_ESTIMATED

View File

@ -21,9 +21,11 @@ CREATE TEMPORARY TABLE table_list (id INT AUTO_INCREMENT, PRIMARY KEY (id)) AS
WHERE TABLE_SCHEMA='performance_schema'
ORDER BY TABLE_NAME;
--disable_cursor_protocol
--enable_prepare_warnings
SELECT COUNT(*) FROM table_list INTO @table_count;
--enable_cursor_protocol
let $count=`SELECT @table_count`;
@ -34,7 +36,9 @@ let $count=`SELECT @table_count`;
while ($count > 0)
{
--disable_cursor_protocol
eval SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=$count;
--enable_cursor_protocol
let $table_name = `SELECT @table_name`;
--error ER_ILLEGAL_HA
eval HANDLER performance_schema.$table_name OPEN;

View File

@ -17,7 +17,9 @@
--source ../include/wait_for_pfs_thread_count.inc
--source ../include/hostcache_set_state.inc
--disable_cursor_protocol
select @@global.max_connect_errors into @saved_max_connect_errors;
--enable_cursor_protocol
set global max_connect_errors = 3;

View File

@ -17,8 +17,10 @@
--source ../include/wait_for_pfs_thread_count.inc
--source ../include/hostcache_set_state.inc
--disable_cursor_protocol
select @@global.max_connections into @saved_max_connections;
select @@global.max_user_connections into @saved_max_user_connections;
--enable_cursor_protocol
create user 'quota'@'santa.claus.ipv4.example.com';
grant select on test.* to 'quota'@'santa.claus.ipv4.example.com';

View File

@ -17,7 +17,9 @@
--source ../include/wait_for_pfs_thread_count.inc
--source ../include/hostcache_set_state.inc
--disable_cursor_protocol
select @@global.max_connect_errors into @saved_max_connect_errors;
--enable_cursor_protocol
set global max_connect_errors = 3;

View File

@ -23,13 +23,17 @@ reset query cache;
flush status;
--disable_ps2_protocol
--disable_cursor_protocol
select * from t1;
--enable_cursor_protocol
show global status like "Qcache_queries_in_cache";
show global status like "Qcache_inserts";
show global status like "Qcache_hits";
--disable_cursor_protocol
select * from t1;
--enable_cursor_protocol
show global status like "Qcache_queries_in_cache";
show global status like "Qcache_inserts";

View File

@ -29,11 +29,13 @@ connection master;
# Read the ID of the binlog dump connection,
# as exposed in PROCESSLIST.
--disable_cursor_protocol
--enable_prepare_warnings
select ID from INFORMATION_SCHEMA.PROCESSLIST
where COMMAND = "Binlog Dump"
into @master_dump_pid;
--disable_prepare_warnings
--enable_cursor_protocol
select COMMAND, STATE
from INFORMATION_SCHEMA.PROCESSLIST
@ -49,11 +51,13 @@ sync_slave_with_master;
# Read the ID of the SLAVE IO thread,
# as exposed in PROCESSLIST.
--disable_cursor_protocol
--enable_prepare_warnings
select ID from INFORMATION_SCHEMA.PROCESSLIST
where STATE like "Waiting for master to send event%"
into @slave_io_pid;
--disable_prepare_warnings
--enable_cursor_protocol
select COMMAND, STATE
from INFORMATION_SCHEMA.PROCESSLIST
@ -66,11 +70,13 @@ select NAME, TYPE, PROCESSLIST_COMMAND, PROCESSLIST_STATE
# Read the ID of the SLAVE SQL thread,
# as exposed in PROCESSLIST.
--disable_cursor_protocol
--enable_prepare_warnings
select ID from INFORMATION_SCHEMA.PROCESSLIST
where STATE like "Slave has read all relay log%"
into @slave_sql_pid;
--disable_prepare_warnings
--enable_cursor_protocol
select COMMAND, STATE
from INFORMATION_SCHEMA.PROCESSLIST

View File

@ -16,6 +16,7 @@ let $my_socket_debug_dbug=0;
--echo #==============================================================================
--source ../include/socket_ipv6.inc
--disable_cursor_protocol
--echo #==============================================================================
--echo # Get hostname, port number
--echo #==============================================================================
@ -291,3 +292,4 @@ WHERE EVENT_NAME LIKE '%client_connection%'
AND OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin;
--source include/wait_condition.inc
exit;
--enable_cursor_protocol

View File

@ -51,9 +51,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`;
@ -71,14 +73,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`;
@ -99,14 +105,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`;
@ -127,14 +137,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`;
@ -237,9 +251,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 DISTINCT 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`;
@ -270,9 +286,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`;
@ -306,7 +324,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;

View File

@ -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`;
@ -70,14 +72,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`;
@ -102,14 +108,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`;
@ -216,9 +226,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`;

View File

@ -41,8 +41,10 @@ let $my_socket_debug_dbug= 0;
--echo #==============================================================================
--echo # Get hostname, port number
--echo #==============================================================================
--disable_cursor_protocol
SELECT @@hostname INTO @MY_HOSTNAME;
SELECT @@port INTO @MY_MASTER_PORT;
--enable_cursor_protocol
if ($my_socket_debug)
{
@ -145,7 +147,7 @@ WHERE t_inst.event_name LIKE '%client%'
--connection default
UPDATE performance_schema.threads
SET INSTRUMENTED='NO' WHERE PROCESSLIST_ID = CONNECTION_ID();
--disable_cursor_protocol
--echo #
--echo # 1.2 Get the default THREAD_ID;
--echo #
@ -161,6 +163,7 @@ let $default_object_instance_begin= `SELECT @my_object_instance_begin`;
--disable_query_log
SELECT @my_object_instance_begin INTO @default_object_instance_begin;
--enable_query_log
--enable_cursor_protocol
if ($my_socket_debug)
{

View File

@ -16,9 +16,11 @@ select * from information_schema.columns where table_schema="performance_schema"
# Count the number of NUMBER_OF_BYTES columns.
--disable_cursor_protocol
select count(*) into @count_byte_columns from information_schema.columns
where table_schema="performance_schema" and data_type = "bigint"
and column_name like "%number_of_bytes";
--enable_cursor_protocol
# Confirm that at least one column was found.
@ -26,10 +28,12 @@ select @count_byte_columns > 0;
# Confirm that all NUMBER_OF_BYTES columns are BIGINT signed.
--disable_cursor_protocol
select count(*) into @count_byte_signed from information_schema.columns
where table_schema="performance_schema" and data_type="bigint"
and column_name like "%number_of_bytes"
and column_type not like "%unsigned";
--enable_cursor_protocol
select (@count_byte_columns - @count_byte_signed) = 0;
@ -38,9 +42,11 @@ select (@count_byte_columns - @count_byte_signed) = 0;
#
# Count the number of OBJECT_INSTANCE_BEGIN columns.
--disable_cursor_protocol
select count(*) into @count_object_columns from information_schema.columns
where table_schema="performance_schema" and data_type = "bigint"
and column_name like "%object_instance_begin";
--enable_cursor_protocol
# Confirm that at least one column was found.
@ -48,10 +54,12 @@ select @count_object_columns > 0;
# Confirm that all OBJECT_INSTANCE_BEGIN columns are BIGINT unsigned.
--disable_cursor_protocol
select count(*) into @count_object_unsigned from information_schema.columns
where table_schema="performance_schema" and data_type="bigint"
and column_name like "%object_instance_begin"
and column_type like "%unsigned";
--enable_cursor_protocol
select (@count_object_columns - @count_object_unsigned) = 0;

View File

@ -36,8 +36,10 @@ let $con2_THREAD_ID=`select thread_id from performance_schema.threads
--connection default
--disable_query_log
--disable_cursor_protocol
eval select ($con2_ID - $con1_ID) into @id_increment;
eval select ($con2_THREAD_ID - $con1_THREAD_ID) into @thread_id_increment;
--enable_cursor_protocol
--enable_query_log
# Expect 1, connection_id() is incremented for each new connection
@ -82,8 +84,10 @@ let $wait_condition=
--source include/wait_condition.inc
--disable_query_log
--disable_cursor_protocol
eval select ($con3_ID - $con2_ID) into @id_increment;
eval select ($con3_THREAD_ID - $con2_THREAD_ID) into @thread_id_increment;
--enable_cursor_protocol
--enable_query_log
select @id_increment;
@ -110,8 +114,10 @@ let $con2_THREAD_ID=`select thread_id from performance_schema.threads
--connection default
--disable_query_log
--disable_cursor_protocol
eval select ($con2_ID - $con1_ID) into @id_increment;
eval select ($con2_THREAD_ID - $con1_THREAD_ID) into @thread_id_increment;
--enable_cursor_protocol
--enable_query_log
select @id_increment;
@ -154,8 +160,10 @@ let $wait_condition=
--source include/wait_condition.inc
--disable_query_log
--disable_cursor_protocol
eval select ($con3_ID - $con2_ID) into @id_increment;
eval select ($con3_THREAD_ID - $con2_THREAD_ID) into @thread_id_increment;
--enable_cursor_protocol
--enable_query_log
# When caching threads, the pthread that executed con2 was parked in the

View File

@ -64,7 +64,9 @@ TRUNCATE t1;
INSERT INTO t1
SELECT thread_id FROM performance_schema.threads
WHERE name LIKE 'thread/sql%';
--disable_cursor_protocol
SELECT COUNT(*) INTO @aux FROM t1;
--enable_cursor_protocol
# Attention:
# Just waiting for some new thread showing up is not sufficient because