1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge 10.5 into 10.6

This commit is contained in:
Marko Mäkelä
2024-06-24 13:09:47 +03:00
333 changed files with 6721 additions and 6118 deletions

View File

@@ -16,7 +16,7 @@ call mtr.add_suppression("Error in Log_event::read_log_event");
# Proof of no crash follows.
# There's no need for actual bin-loggable queries to the server
--let $restart_parameters= --master_verify_checksum=ON --debug_dbug="+d,corrupt_read_log_event_char"
--let $restart_parameters= --master_verify_checksum=ON --debug_dbug=+d,corrupt_read_log_event_char
--let $shutdown_timeout=0
--source include/restart_mysqld.inc
--let $restart_parameters=

View File

@@ -6,13 +6,13 @@ SELECT @@wsrep_slave_threads;
1
SET GLOBAL wsrep_slave_threads=2;
KILL ID;
Got one of the listed errors
ERROR HY000: This is a high priority thread/query and cannot be killed without compromising the consistency of the cluster
KILL QUERY ID;
Got one of the listed errors
ERROR HY000: This is a high priority thread/query and cannot be killed without compromising the consistency of the cluster
KILL ID;
Got one of the listed errors
ERROR HY000: This is a high priority thread/query and cannot be killed without compromising the consistency of the cluster
KILL QUERY ID;
Got one of the listed errors
ERROR HY000: This is a high priority thread/query and cannot be killed without compromising the consistency of the cluster
SET GLOBAL wsrep_slave_threads=DEFAULT;
connection node_1;
create table t1(a int not null primary key) engine=innodb;

View File

@@ -0,0 +1,25 @@
connection node_2;
connection node_1;
connect con1,127.0.0.1,root,,test,$NODE_MYPORT_1;
call mtr.add_suppression("WSREP: ALTER TABLE isolation failure");
CREATE TABLE t1(c1 INT PRIMARY KEY, c2 INT) ENGINE=InnoDB;
INSERT into t1 values (1,1);
SET DEBUG_SYNC = 'alter_table_after_open_tables SIGNAL bf_started WAIT_FOR bf_continue';
ALTER TABLE t1 DROP COLUMN c2;;
connection node_1;
SET SESSION wsrep_sync_wait = 0;
SET DEBUG_SYNC = 'now WAIT_FOR bf_started';
KILL ID;
ERROR HY000: This is a high priority thread/query and cannot be killed without compromising the consistency of the cluster
KILL QUERY ID;
ERROR HY000: This is a high priority thread/query and cannot be killed without compromising the consistency of the cluster
connection node_1;
SET DEBUG_SYNC = 'now SIGNAL bf_continue';
connection con1;
SET DEBUG_SYNC = 'RESET';
SELECT * FROM t1;
c1
1
connection node_1;
DROP TABLE t1;
disconnect con1;

View File

@@ -17,21 +17,21 @@ SET GLOBAL wsrep_slave_threads=2;
--let $applier_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle' LIMIT 1`
--replace_result $applier_thread ID
--error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR
--error ER_KILL_DENIED_ERROR
--eval KILL $applier_thread
--replace_result $applier_thread ID
--error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR
--error ER_KILL_DENIED_ERROR
--eval KILL QUERY $applier_thread
--let $aborter_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep aborter idle' LIMIT 1`
--replace_result $aborter_thread ID
--error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR
--error ER_KILL_DENIED_ERROR
--eval KILL $aborter_thread
--replace_result $aborter_thread ID
--error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR
--error ER_KILL_DENIED_ERROR
--eval KILL QUERY $aborter_thread
SET GLOBAL wsrep_slave_threads=DEFAULT;

View File

@@ -0,0 +1,41 @@
--source include/galera_cluster.inc
--source include/have_debug_sync.inc
--source include/have_debug.inc
--connect con1,127.0.0.1,root,,test,$NODE_MYPORT_1
call mtr.add_suppression("WSREP: ALTER TABLE isolation failure");
CREATE TABLE t1(c1 INT PRIMARY KEY, c2 INT) ENGINE=InnoDB;
INSERT into t1 values (1,1);
SET DEBUG_SYNC = 'alter_table_after_open_tables SIGNAL bf_started WAIT_FOR bf_continue';
--send ALTER TABLE t1 DROP COLUMN c2;
--connection node_1
SET SESSION wsrep_sync_wait = 0;
SET DEBUG_SYNC = 'now WAIT_FOR bf_started';
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'debug sync point: alter_table_after_open_tables'
--source include/wait_condition.inc
--let $applier_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'debug sync point:%' LIMIT 1`
--replace_result $applier_thread ID
--error ER_KILL_DENIED_ERROR
--eval KILL $applier_thread
--replace_result $applier_thread ID
--error ER_KILL_DENIED_ERROR
--eval KILL QUERY $applier_thread
--connection node_1
SET DEBUG_SYNC = 'now SIGNAL bf_continue';
--connection con1
--reap
SET DEBUG_SYNC = 'RESET';
SELECT * FROM t1;
--connection node_1
DROP TABLE t1;
--disconnect con1

View File

@@ -90,7 +90,7 @@ show variables like 'wsrep_gtid_domain_id';
# If bug is present, node_3 remains on domain id 100
#
--connection node_3
--let $restart_parameters = --wsrep_sst_donor="node2"
--let $restart_parameters = --wsrep_sst_donor=node2
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.3.expect
--source include/start_mysqld.inc

View File

@@ -6,3 +6,4 @@ call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE faile
# MDEV-25019 memory allocation failures during startup cause server failure in different, confusing ways
#
# restart: --debug_dbug=+d,ib_buf_chunk_init_fails
FOUND 1 /\[ERROR\] InnoDB: Cannot allocate memory for the buffer pool/ in mysqld.1.err

View File

@@ -0,0 +1,8 @@
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
call mtr.add_suppression("plugin 'InnoDB' registration as a STORAGE ENGINE failed.");
CREATE TABLE t1(f1 INT NOT NULL, f2 TEXT)ENGINE=InnoDB;
# restart: --debug_dbug=+d,ib_log_checkpoint_avoid_hard --innodb_flush_sync=0
INSERT INTO t1 SELECT seq, repeat('a', 4000) FROM seq_1_to_1800;
# restart: --debug_dbug=+d,before_final_redo_apply --innodb_log_file_size=8M
# restart: --innodb_log_file_size=10M
DROP TABLE t1;

View File

@@ -0,0 +1,10 @@
--- recovery_memory.result 2024-06-21 12:54:38.026355524 +0530
+++ recovery_memory.reject 2024-06-21 17:22:49.394535026 +0530
@@ -23,6 +23,7 @@
CREATE TABLE t1(f1 INT NOT NULL)ENGINE=InnoDB;
INSERT INTO t1 SELECT * FROM seq_1_to_65536;
# restart: with restart_parameters
+FOUND 1 /\[ERROR\] InnoDB: The change buffer is corrupted or has been removed on upgrade to MariaDB 11.0 or later/ in mysqld.1.err
# restart
SHOW CREATE TABLE t1;
Table Create Table

View File

@@ -7,5 +7,8 @@ call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE faile
--echo #
--echo # MDEV-25019 memory allocation failures during startup cause server failure in different, confusing ways
--echo #
let restart_parameters=--debug_dbug="+d,ib_buf_chunk_init_fails";
let restart_parameters=--debug_dbug=+d,ib_buf_chunk_init_fails;
--source include/restart_mysqld.inc
let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1.err;
let SEARCH_PATTERN=\[ERROR\] InnoDB: Cannot allocate memory for the buffer pool;
--source include/search_pattern_in_file.inc

View File

@@ -0,0 +1,17 @@
--source include/have_innodb.inc
--source include/have_sequence.inc
--source include/have_debug.inc
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
call mtr.add_suppression("plugin 'InnoDB' registration as a STORAGE ENGINE failed.");
CREATE TABLE t1(f1 INT NOT NULL, f2 TEXT)ENGINE=InnoDB;
let $restart_parameters=--debug_dbug=+d,ib_log_checkpoint_avoid_hard --innodb_flush_sync=0;
--source include/restart_mysqld.inc
INSERT INTO t1 SELECT seq, repeat('a', 4000) FROM seq_1_to_1800;
let $restart_parameters=--debug_dbug=+d,before_final_redo_apply --innodb_log_file_size=8M;
let $shutdown_timeout=0;
--source include/restart_mysqld.inc
let $restart_parameters=--innodb_log_file_size=10M;
let $shutdown_timeout=;
--source include/restart_mysqld.inc
DROP TABLE t1;

View File

@@ -33,7 +33,7 @@ DROP PROCEDURE dorepeat;
--echo #
if ($have_debug) {
SET DEBUG_DBUG="+d,ib_log_checkpoint_avoid_hard";
let $restart_parameters=--innodb_buffer_pool_size=5242880 --debug_dbug="+d,ibuf_init_corrupt";
let $restart_parameters=--innodb_buffer_pool_size=5242880 --debug_dbug=+d,ibuf_init_corrupt;
}
if (!$have_debug) {
--echo SET DEBUG_DBUG="+d,ib_log_checkpoint_avoid_hard";
@@ -44,6 +44,11 @@ INSERT INTO t1 SELECT * FROM seq_1_to_65536;
let $restart_noprint=1;
let $shutdown_timeout=0;
--source include/restart_mysqld.inc
if ($have_debug) {
let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1.err;
let SEARCH_PATTERN=\[ERROR\] InnoDB: The change buffer is corrupted or has been removed on upgrade to MariaDB 11.0 or later;
--source include/search_pattern_in_file.inc
}
let $restart_noprint=0;
let $restart_parameters=;
--source include/restart_mysqld.inc

View File

@@ -0,0 +1,28 @@
include/master-slave.inc
[connection master]
include/assert.inc [Password length is 96]
connection master;
SET SQL_LOG_BIN=0;
GRANT REPLICATION SLAVE ON *.* TO rpl@127.0.0.1 IDENTIFIED BY '123456789X12141618202224262830323436384042444648505254565860626466687072747678808284868890929496';
SET SQL_LOG_BIN=1;
connection slave;
include/stop_slave.inc
CHANGE MASTER TO MASTER_HOST='127.0.0.1', master_user='rpl', master_password='123456789X12141618202224262830323436384042444648505254565860626466687072747678808284868890929496';
include/start_slave.inc
include/check_slave_param.inc [Slave_IO_Running]
connection master;
include/rpl_restart_server.inc [server_number=2]
connection slave;
include/start_slave.inc
include/check_slave_param.inc [Slave_IO_Running]
connection master;
SET SQL_LOG_BIN=0;
DROP USER rpl@127.0.0.1;
FLUSH PRIVILEGES;
SET SQL_LOG_BIN=1;
connection slave;
include/stop_slave.inc
CHANGE MASTER TO MASTER_USER = 'root', MASTER_PASSWORD = '';
include/start_slave.inc
connection master;
include/rpl_end.inc

View File

@@ -0,0 +1,80 @@
#
# This test validates a fix for a bug where slaves only read the
# first 41 characters of MASTER_PASSWORD from the master.info file
# after restarts.
#
# The test ensures that passwords up to the maximum allowable
# length (96 ASCII characters) will be read from the master.info
# file after slave restarts
#
# References:
# MDEV-23857: replication master password length
#
# Test is format independent, so only run with one format
--source include/have_binlog_format_mixed.inc
--source include/master-slave.inc
#####
# Setup
#
--let $passwd=123456789X12141618202224262830323436384042444648505254565860626466687072747678808284868890929496
--let $expected_pwlen=96
--let assert_cond=CHAR_LENGTH("$passwd")=$expected_pwlen
--let assert_text=Password length is $expected_pwlen
--source include/assert.inc
connection master;
SET SQL_LOG_BIN=0;
--eval GRANT REPLICATION SLAVE ON *.* TO rpl@127.0.0.1 IDENTIFIED BY '$passwd'
SET SQL_LOG_BIN=1;
#####
#####
# Change master to new user/password combination
#
connection slave;
--source include/stop_slave.inc
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', master_user='rpl', master_password='$passwd'
--source include/start_slave.inc
--let $slave_param= Slave_IO_Running
--let $slave_param_value= Yes
--source include/check_slave_param.inc
#####
#####
# Ensure slave can re-connect to master after restart
#
connection master;
--let $rpl_server_number= 2
--source include/rpl_restart_server.inc
connection slave;
--source include/start_slave.inc
--let $slave_param= Slave_IO_Running
--let $slave_param_value= Yes
--source include/check_slave_param.inc
#####
#####
# Cleanup
#
connection master;
SET SQL_LOG_BIN=0;
DROP USER rpl@127.0.0.1;
FLUSH PRIVILEGES;
SET SQL_LOG_BIN=1;
connection slave;
--source include/stop_slave.inc
CHANGE MASTER TO MASTER_USER = 'root', MASTER_PASSWORD = '';
--source include/start_slave.inc
connection master;
-- source include/rpl_end.inc
#####

View File

@@ -0,0 +1,37 @@
#
# MDEV-27966 Assertion `fixed()' failed and Assertion `fixed == 1' failed, both in Item_func_concat::val_str on SELECT after INSERT with collation utf32_bin on utf8_bin table
#
SET NAMES utf8mb3;
SET sql_mode='';
CREATE TABLE t (c1 INT,c2 CHAR AS (CONCAT ('',DAYNAME ('')))) COLLATE utf8_bin ENGINE=InnoDB;
Warnings:
Warning 1286 Unknown storage engine 'InnoDB'
Warning 1266 Using storage engine MyISAM for table 't'
INSERT INTO t VALUES (0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0);
Warnings:
Warning 1906 The value specified for generated column 'c2' in table 't' has been ignored
Warning 1292 Incorrect datetime value: ''
Warning 1906 The value specified for generated column 'c2' in table 't' has been ignored
Warning 1292 Incorrect datetime value: ''
Warning 1906 The value specified for generated column 'c2' in table 't' has been ignored
Warning 1292 Incorrect datetime value: ''
Warning 1906 The value specified for generated column 'c2' in table 't' has been ignored
Warning 1292 Incorrect datetime value: ''
Warning 1906 The value specified for generated column 'c2' in table 't' has been ignored
Warning 1292 Incorrect datetime value: ''
Warning 1906 The value specified for generated column 'c2' in table 't' has been ignored
Warning 1292 Incorrect datetime value: ''
Warning 1906 The value specified for generated column 'c2' in table 't' has been ignored
Warning 1292 Incorrect datetime value: ''
Warning 1906 The value specified for generated column 'c2' in table 't' has been ignored
Warning 1292 Incorrect datetime value: ''
Warning 1906 The value specified for generated column 'c2' in table 't' has been ignored
Warning 1292 Incorrect datetime value: ''
SET collation_connection='utf32_bin';
INSERT INTO t VALUES (0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0);
ERROR HY000: Illegal mix of collations (utf8mb3_bin,COERCIBLE) and (utf32_bin,COERCIBLE) for operation 'concat'
SELECT * FROM t;
ERROR HY000: Illegal mix of collations (utf8mb3_bin,COERCIBLE) and (utf32_bin,COERCIBLE) for operation 'concat'
DROP TABLE t;
SET sql_mode=DEFAULT;
SET NAMES utf8mb3;

View File

@@ -0,0 +1,18 @@
--source include/have_utf32.inc
--echo #
--echo # MDEV-27966 Assertion `fixed()' failed and Assertion `fixed == 1' failed, both in Item_func_concat::val_str on SELECT after INSERT with collation utf32_bin on utf8_bin table
--echo #
SET NAMES utf8mb3;
SET sql_mode='';
CREATE TABLE t (c1 INT,c2 CHAR AS (CONCAT ('',DAYNAME ('')))) COLLATE utf8_bin ENGINE=InnoDB;
INSERT INTO t VALUES (0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0);
SET collation_connection='utf32_bin';
--error ER_CANT_AGGREGATE_2COLLATIONS
INSERT INTO t VALUES (0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0);
--error ER_CANT_AGGREGATE_2COLLATIONS
SELECT * FROM t;
DROP TABLE t;
SET sql_mode=DEFAULT;
SET NAMES utf8mb3;