1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

Merge 10.11 into 11.0

This commit is contained in:
Marko Mäkelä
2024-03-28 10:51:36 +02:00
490 changed files with 14843 additions and 4704 deletions

View File

@@ -59,6 +59,10 @@
#VARCHAR(M)
#
--disable_query_log
call mtr.add_suppression("Could not read packet:.* errno: 11");
--enable_query_log
--let $_saved_conn= $CURRENT_CONNECTION
let $binformat = `SHOW VARIABLES LIKE '%binlog_format%'`;

View File

@@ -0,0 +1,64 @@
include/master-slave.inc
[connection master]
drop table if exists t1;
connection slave;
reset master;
CREATE TABLE IF NOT EXISTS mysql.server_audit_filters (
filtername char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
rule longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT 'true' CHECK (json_valid(rule)),
CONSTRAINT c_filtername UNIQUE (filtername)
) ENGINE=Aria;
CREATE TABLE IF NOT EXISTS mysql.server_audit_users (host char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
user char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
filtername char(80) NOT NULL DEFAULT '',
CONSTRAINT c_host_user UNIQUE (host, user)
) ENGINE=Aria;
INSERT INTO mysql.server_audit_filters VALUES ('ignore_sys', '{"ignore_tables" : "mysql.*"}');
INSERT INTO mysql.server_audit_users VALUES ('%','<replication_slave>','ignore_sys');
INSERT INTO mysql.server_audit_users VALUES ('%','root','ignore_sys');
install plugin server_audit soname 'server_audit2';
set global server_audit_logging=on;
connection master;
create table t1 (a int);
insert into t1 values (1);
truncate t1;
drop table t1;
connection slave;
set global server_audit_logging=off;
truncate mysql.server_audit_filters;
truncate mysql.server_audit_users;
INSERT INTO mysql.server_audit_filters VALUES ('no_logging','false');
INSERT INTO mysql.server_audit_users VALUES ('%','<replication_slave>','no_logging');
set global server_audit_logging=on;
connection master;
create table t1 (a int);
insert into t1 values (1);
truncate t1;
drop table t1;
connection slave;
set global server_audit_logging=off;
uninstall plugin server_audit;
Warnings:
Warning 1620 Plugin is busy and will be uninstalled on shutdown
truncate mysql.server_audit_filters;
truncate mysql.server_audit_users;
TIME,HOSTNAME,,,0,0,AUDIT_CONFIG,,file_path=server_audit.log,0
TIME,HOSTNAME,,,0,0,AUDIT_CONFIG,,rotate_size=1000000,0
TIME,HOSTNAME,,,0,0,AUDIT_CONFIG,,file_rotations=9,0
TIME,HOSTNAME,root,localhost,ID,0,AUDIT_CONFIG,test,logging=ON,0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_logging=on',0
TIME,HOSTNAME,<replication_slave>,,ID,ID,CREATE,test,t1,
TIME,HOSTNAME,<replication_slave>,,ID,ID,WRITE,test,t1,
TIME,HOSTNAME,<replication_slave>,,ID,ID,CREATE,test,t1,
TIME,HOSTNAME,<replication_slave>,,ID,ID,DROP,test,t1,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select master_pos_wait(\'master-bin.#', POS, 300, \'\')',0
TIME,HOSTNAME,root,localhost,ID,0,AUDIT_CONFIG,test,logging=OFF,0
TIME,HOSTNAME,,,0,0,AUDIT_CONFIG,,file_path=server_audit.log,0
TIME,HOSTNAME,,,0,0,AUDIT_CONFIG,,rotate_size=1000000,0
TIME,HOSTNAME,,,0,0,AUDIT_CONFIG,,file_rotations=9,0
TIME,HOSTNAME,root,localhost,ID,0,AUDIT_CONFIG,test,logging=ON,0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_logging=on',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select master_pos_wait(\'master-bin.#', POS, 300, \'\')',0
TIME,HOSTNAME,root,localhost,ID,0,AUDIT_CONFIG,test,logging=OFF,0
connection master;
include/rpl_end.inc

View File

@@ -1,6 +1,7 @@
include/master-slave.inc
[connection master]
connection master;
SET @org_log_warnings=@@GLOBAL.LOG_WARNINGS;
SET GLOBAL LOG_WARNINGS=2;
connection slave;
include/stop_slave.inc
@@ -41,11 +42,11 @@ connection master;
include/wait_for_pattern_in_file.inc
FOUND 1 /using_gtid\(1\), gtid\(\'0-1-2,10-1-1\'\).*/ in mysqld.1.err
"===== Clean up ====="
SET GLOBAL LOG_WARNINGS=@org_log_warnings;
connection slave;
include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=no;
include/start_slave.inc
connection master;
DROP TABLE t;
SET GLOBAL LOG_WARNINGS=default;
include/rpl_end.inc

View File

@@ -26,9 +26,4 @@ connection master;
CHANGE MASTER TO MASTER_USER='root', MASTER_SSL=0, MASTER_SSL_CA='', MASTER_SSL_CERT='',
MASTER_SSL_KEY='', MASTER_SSL_CRL='', MASTER_SSL_CRLPATH='';
CHANGE MASTER TO MASTER_USER='root', MASTER_PASSWORD='', MASTER_SSL=0;
"Usage of CURRENT_POS in CHANGE MASTER MASTER_USE_GTID is dreprecated.
CHANGE MASTER TO MASTER_USE_GTID=CURRENT_POS;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
CHANGE MASTER TO MASTER_USE_GTID=SLAVE_POS;
include/rpl_end.inc

View File

@@ -1,9 +1,6 @@
include/master-slave.inc
[connection master]
connection master;
call mtr.add_suppression("mysqld: Table '.*gtid_slave_pos' is marked as crashed and should be repaired");
call mtr.add_suppression("Checking table: './mysql/gtid_slave_pos'");
call mtr.add_suppression("mysql.gtid_slave_pos: 1 client is using or hasn't closed the table properly");
SET @@session.gtid_domain_id= 0;
create table ti (a int auto_increment primary key) engine=innodb;
create table tm (a int auto_increment primary key) engine=myisam;

View File

@@ -657,7 +657,7 @@ START SLAVE;
STOP SLAVE;
include/reset_slave.inc
Warnings:
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-103. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-104. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='InnoDB';
@@ -697,7 +697,7 @@ Last_SQL_Error = 'Error 'Unknown column 'c7' in 't15'' on query. Default databas
STOP SLAVE;
include/reset_slave.inc
Warnings:
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-104. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-105. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
*** Drop t15 ***
DROP TABLE t15;
@@ -716,7 +716,7 @@ START SLAVE;
STOP SLAVE;
include/reset_slave.inc
Warnings:
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-105. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-106. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='InnoDB';
@@ -756,7 +756,7 @@ Last_SQL_Error = 'Error 'Key column 'c6' doesn't exist in table' on query. Defau
STOP SLAVE;
include/reset_slave.inc
Warnings:
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-106. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-107. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
*** Drop t16 ***
DROP TABLE t16;
@@ -775,7 +775,7 @@ START SLAVE;
STOP SLAVE;
include/reset_slave.inc
Warnings:
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-107. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-108. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='InnoDB';

View File

@@ -657,7 +657,7 @@ START SLAVE;
STOP SLAVE;
include/reset_slave.inc
Warnings:
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-103. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-104. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='MyISAM';
@@ -697,7 +697,7 @@ Last_SQL_Error = 'Error 'Unknown column 'c7' in 't15'' on query. Default databas
STOP SLAVE;
include/reset_slave.inc
Warnings:
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-104. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-105. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
*** Drop t15 ***
DROP TABLE t15;
@@ -716,7 +716,7 @@ START SLAVE;
STOP SLAVE;
include/reset_slave.inc
Warnings:
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-105. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-106. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='MyISAM';
@@ -756,7 +756,7 @@ Last_SQL_Error = 'Error 'Key column 'c6' doesn't exist in table' on query. Defau
STOP SLAVE;
include/reset_slave.inc
Warnings:
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-106. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-107. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
*** Drop t16 ***
DROP TABLE t16;
@@ -775,7 +775,7 @@ START SLAVE;
STOP SLAVE;
include/reset_slave.inc
Warnings:
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-107. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-108. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='MyISAM';

View File

@@ -1,6 +1,6 @@
include/master-slave.inc
[connection master]
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
SET GLOBAL LOG_WARNINGS=4;
create table t1(n int);
insert into t1 values(get_lock("lock",2));
disconnect master;
@@ -35,4 +35,5 @@ NULL
connection master1;
drop table t1;
connection slave;
connection default;
include/rpl_end.inc

View File

@@ -69,8 +69,6 @@ INSERT INTO t2 VALUES (5, "i1a");
connection server_4;
CHANGE MASTER TO master_host = '127.0.0.1', master_port = MASTER_PORT,
MASTER_USE_GTID=CURRENT_POS;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
include/start_slave.inc
SELECT * FROM t1 ORDER BY a;
a b
@@ -91,8 +89,6 @@ connection server_2;
include/stop_slave.inc
CHANGE MASTER TO master_host = '127.0.0.1', master_port = SERVER_MYPORT_4,
MASTER_USE_GTID=CURRENT_POS;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
include/start_slave.inc
connection server_4;
UPDATE t2 SET b="j1a" WHERE a=5;
@@ -121,8 +117,6 @@ include/save_master_gtid.inc
connection server_3;
CHANGE MASTER TO master_host = '127.0.0.1', master_port = SERVER_MYPORT_4,
MASTER_USE_GTID=CURRENT_POS;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
include/start_slave.inc
include/sync_with_master_gtid.inc
SELECT * FROM t2 ORDER BY a;

View File

@@ -4,6 +4,7 @@ connection server_1;
call mtr.add_suppression("Checking table:");
call mtr.add_suppression("client is using or hasn't closed the table properly");
call mtr.add_suppression("Table .* is marked as crashed and should be repaired");
call mtr.add_suppression("Could not read packet:.* errno: 11");
flush tables;
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;

View File

@@ -75,8 +75,6 @@ INSERT INTO t1 VALUES (2);
SET sql_log_bin = 1;
INSERT INTO t1 VALUES (3);
CHANGE MASTER TO master_use_gtid=current_pos;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
BEGIN;
SET GLOBAL gtid_slave_pos = "100-100-100";
ERROR 25000: You are not allowed to execute this command in a transaction

View File

@@ -50,5 +50,4 @@ CHANGE MASTER TO MASTER_USE_GTID=no;
include/start_slave.inc
connection master;
DROP TABLE t;
SET GLOBAL LOG_WARNINGS=default;
include/rpl_end.inc

View File

@@ -45,8 +45,6 @@ SET GLOBAL gtid_slave_pos= '0-2-10';
connection server_1;
CHANGE MASTER TO master_host = '127.0.0.1', master_port = SERVER_MYPORT_2,
master_user= 'root', master_use_gtid=CURRENT_POS;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
START SLAVE;
connection server_2;
INSERT INTO t1 VALUES (11);
@@ -76,8 +74,6 @@ connection server_2;
INSERT INTO t1 VALUES (22);
CHANGE MASTER TO master_host = '127.0.0.1', master_port = SERVER_MYPORT_1,
master_user= 'root', master_use_gtid=CURRENT_POS;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
START SLAVE;
SET sql_log_bin= 0;
CALL mtr.add_suppression("which is not in the master's binlog. Since the master's binlog contains GTIDs with higher sequence numbers, it probably means that the slave has diverged");

View File

@@ -9,8 +9,6 @@ Variable_name Slave_heartbeat_period
Value 60.000
SET @saved_dbug= @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug="+d,simulate_slave_heartbeat_network_error";
CALL mtr.add_suppression('SET @master_heartbeat_period to master failed with error');
CALL mtr.add_suppression('Master command COM_REGISTER_SLAVE failed: failed registering on master, reconnecting to try again');
include/start_slave.inc
connection master;
drop table if exists t1;

View File

@@ -2,6 +2,8 @@ include/master-slave.inc
[connection master]
call mtr.add_suppression("Slave I/O: Got a packet bigger than 'slave_max_allowed_packet' bytes, .*error.* 1153");
call mtr.add_suppression("Log entry on master is longer than slave_max_allowed_packet");
call mtr.add_suppression("Could not write packet:");
call mtr.add_suppression("Got a packet bigger than 'max_allowed_packet' bytes");
drop database if exists DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________;
create database DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________;
connection master;

View File

@@ -626,6 +626,7 @@ include/save_master_gtid.inc
connection server_2;
include/sync_with_master_gtid.inc
connection server_2;
SET @org_log_warnings=@@GLOBAL.LOG_WARNINGS;
set global log_warnings=2;
BEGIN;
INSERT INTO t1 SET a=1;
@@ -651,7 +652,7 @@ connection server_2;
include/sync_with_master_gtid.inc
connection server_2;
include/stop_slave.inc
set global log_warnings=default;
set global log_warnings=@org_log_warnings;
SET GLOBAL slave_parallel_mode=@old_parallel_mode;
SET GLOBAL slave_parallel_threads=@old_parallel_threads;
include/start_slave.inc

View File

@@ -32,7 +32,6 @@ include/diff_tables.inc [master:t0, slave:t0]
include/diff_tables.inc [master:t1, slave:t1]
connection slave;
include/stop_slave.inc
set global log_warnings=default;
SET GLOBAL slave_parallel_mode=@old_parallel_mode;
SET GLOBAL slave_parallel_threads=@old_parallel_threads;
include/start_slave.inc

View File

@@ -32,7 +32,6 @@ include/diff_tables.inc [master:t0, slave:t0]
include/diff_tables.inc [master:t1, slave:t1]
connection slave;
include/stop_slave.inc
set global log_warnings=default;
SET GLOBAL slave_parallel_mode=@old_parallel_mode;
SET GLOBAL slave_parallel_threads=@old_parallel_threads;
include/start_slave.inc

View File

@@ -339,6 +339,28 @@ connection server_1;
DROP TABLE t1, t2, t3, t4;
DROP function foo;
connection server_2;
connection server_2;
include/stop_slave.inc
SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
SET GLOBAL slave_parallel_threads=4;
connection server_1;
CREATE TABLE t1 (a INT, b VARCHAR(123)) ENGINE=InnoDB;
INSERT INTO t1 VALUES(1, 'asdf');
UPDATE t1 SET b='zxf1' WHERE a=1;
UPDATE t1 SET b='\n' WHERE a=1;
connection server_2;
SET @old_dbug=@@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug="+d,write_row_inject_sleep_before_ha_write_row";
include/start_slave.inc
connection server_1;
connection server_2;
connection server_1;
DROP TABLE t1;
connection server_2;
include/stop_slave.inc
SET GLOBAL debug_dbug=@old_dbug;
SET GLOBAL slave_parallel_threads=@old_parallel_threads;
include/start_slave.inc
connection server_1;
CREATE TABLE t1 (a int PRIMARY KEY, b INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES(100, 100);

View File

@@ -27,12 +27,19 @@ connection slave;
# delaying a transaction; then when the reciprocal START SLAVE occurs,
# if the event is still to be delayed, SBM should resume accordingly
include/stop_slave.inc
# Lock t1 on slave to ensure the event can't finish (and thereby update
# Seconds_Behind_Master) so slow running servers don't accidentally
# catch up to the master before checking SBM.
connection server_2;
LOCK TABLES t1 WRITE;
include/start_slave.inc
connection slave;
# Waiting for replica to resume the delay for the transaction
# Sleeping 1s to increment SBM
# Ensuring Seconds_Behind_Master increases after sleeping..
# ..done
connection server_2;
UNLOCK TABLES;
include/sync_with_master_gtid.inc
#
# Pt 2) If the worker threads have not entered an idle state, ensure

View File

@@ -37,7 +37,9 @@ connection con_temp1;
BEGIN;
INSERT INTO t2 VALUES (21);
connection server_2;
START SLAVE;
START SLAVE IO_THREAD;
include/wait_for_slave_param.inc [Read_Master_Log_Pos]
START SLAVE SQL_THREAD;
connection con_temp2;
SET @old_dbug= @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug="+d,rpl_parallel_wait_for_done_trigger";

View File

@@ -202,6 +202,24 @@ a b
include/stop_slave.inc
SET GLOBAL slave_parallel_mode=@old_mode;
include/start_slave.inc
*** MDEV33426: Memory allocation accounting incorrect for replicated temptable
connection server_1;
CREATE TEMPORARY TABLE t5 (a int) ENGINE=Aria;
CREATE TEMPORARY TABLE t6 (a int) ENGINE=Heap;
INSERT INTO t5 VALUES (1);
INSERT INTO t6 VALUES (2);
connection server_2;
include/stop_slave.inc
connection server_1;
INSERT INTO t1 SELECT a+40, 5 FROM t5;
INSERT INTO t1 SELECT a+40, 6 FROM t6;
DROP TABLE t5, t6;
connection server_2;
include/start_slave.inc
SELECT * FROM t1 WHERE a>=40 ORDER BY a;
a b
41 5
42 6
connection server_2;
include/stop_slave.inc
SET GLOBAL slave_parallel_threads=@old_parallel_threads;

View File

@@ -87,8 +87,6 @@ include/assert.inc [Value returned by SSS and PS table for Using_Gtid should be
change master to
master_user = 'root',
master_use_gtid= CURRENT_POS;
Warnings:
Warning #### 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
include/assert.inc [Value returned by SSS and PS table for Using_Gtid should be same.]
# 3) Test for Auto_position= SLAVE_POS

View File

@@ -20,6 +20,5 @@ FOUND 1 /The slave is applying a ROW event on behalf of an UPDATE statement on t
FOUND 1 /The slave is applying a ROW event on behalf of a DELETE statement on table t1 and is currently taking a considerable amount/ in mysqld.2.err
include/stop_slave.inc
SET @@GLOBAL.debug_dbug = @saved_dbug;
SET GLOBAL log_warnings = 2;
include/start_slave.inc
include/rpl_end.inc

View File

@@ -0,0 +1,32 @@
include/master-slave.inc
[connection master]
connection master;
call mtr.add_suppression("Got an error reading communication packets");
set @save_bgc_count= @@global.binlog_commit_wait_count;
set @save_bgc_usec= @@global.binlog_commit_wait_usec;
set @save_debug_dbug= @@global.debug_dbug;
set @@global.binlog_commit_wait_count=3;
set @@global.binlog_commit_wait_usec=10000000;
set @@global.debug_dbug="+d,testing_cond_var_per_thd";
# Ensure semi-sync is on
connection slave;
connection master;
# Create three transactions to binlog group commit together
connection master;
create table t1 (a int);
connection server_1;
create table t2 (a int);
connection default;
create table t3 (a int);
connection master;
connection server_1;
connection default;
include/assert_grep.inc [Check that there is no 'Thread awaiting semi-sync ACK was awoken before its ACK' warning in error log.]
#
# Cleanup
connection master;
set @@global.binlog_commit_wait_count=@save_bgc_count;
set @@global.binlog_commit_wait_usec=@save_bgc_usec;
set @@global.debug_dbug=@save_debug_dbug;
drop table t1, t2, t3;
include/rpl_end.inc

View File

@@ -50,6 +50,8 @@ SELECT @@GLOBAL.gtid_current_pos;
0-1-4
# restart: --skip-slave-start=1 --rpl-semi-sync-slave-enabled=1
connection server_1;
# Ensuring variable rpl_semi_sync_slave_enabled is ON..
# Ensuring status rpl_semi_sync_slave_status is OFF..
include/assert.inc [Table t1 should have 1 rows.]
FOUND 1 /truncated binlog file:.*master.*000001/ in mysqld.1.err
disconnect conn_client;
@@ -128,6 +130,8 @@ SELECT @@GLOBAL.gtid_current_pos;
0-2-7
# restart: --skip-slave-start=1 --rpl-semi-sync-slave-enabled=1
connection server_2;
# Ensuring variable rpl_semi_sync_slave_enabled is ON..
# Ensuring status rpl_semi_sync_slave_status is OFF..
include/assert.inc [Table t1 should have 3 rows.]
FOUND 1 /truncated binlog file:.*slave.*000002.* to remove transactions starting from GTID 0-1-6/ in mysqld.2.err
disconnect conn_client;
@@ -207,6 +211,8 @@ SELECT @@GLOBAL.gtid_current_pos;
0-1-9
# restart: --skip-slave-start=1 --rpl-semi-sync-slave-enabled=1
connection server_1;
# Ensuring variable rpl_semi_sync_slave_enabled is ON..
# Ensuring status rpl_semi_sync_slave_status is OFF..
include/assert.inc [Table t1 should have 6 rows.]
FOUND 1 /truncated binlog file:.*master.*000002.* to remove transactions starting from GTID 0-1-9/ in mysqld.1.err
disconnect conn_client;

View File

@@ -25,7 +25,7 @@ call mtr.add_suppression("Failed to kill the active semi-sync connection");
set @sav_enabled_server_3= @@GLOBAL.rpl_semi_sync_slave_enabled;
set @sav_server_3_dbug= @@GLOBAL.debug_dbug;
connection server_1;
CREATE TABLE t1 (a int);
CREATE TABLE t1 (a int) engine=innodb;
connection server_2;
connection server_3;
connect server_1_con2, localhost, root,,;
@@ -34,8 +34,8 @@ connect server_1_con2, localhost, root,,;
#############################
#
# Test Case 1) If both replicas simulate a delay that is within the
# allowed timeout, the primary should delay killing the suspended thread
# until an ACK is received (Rpl_semi_sync_master_yes_tx should be 1).
# allowed timeout, the primary should delay killing the Ack_thread
# until an ACK is received.
#
connection server_1;
#--
@@ -78,8 +78,6 @@ SET @@GLOBAL.debug_dbug= "+d,simulate_delay_semisync_slave_reply";
#--
#-- Test begins
connection server_1_con2;
#-- Give enough time after timeout/ack received to query yes_tx/no_tx
SET @@GLOBAL.debug_dbug= "+d,delay_shutdown_phase_2_after_semisync_wait";
connection server_1;
#-- Begin semi-sync transaction
INSERT INTO t1 VALUES (1);
@@ -88,14 +86,7 @@ connection server_1_con2;
#-- Begin master shutdown
SHUTDOWN WAIT FOR ALL SLAVES;
connection server_1;
#-- Ensure either ACK was received (yes_tx=1) or timeout (no_tx=1)
show status like 'Rpl_semi_sync_master_yes_tx';
Variable_name Value
Rpl_semi_sync_master_yes_tx 1
show status like 'Rpl_semi_sync_master_no_tx';
Variable_name Value
Rpl_semi_sync_master_no_tx 0
connection server_1_con2;
ERROR HY000: Lost connection to server during query
# Check logs to ensure shutdown was delayed
FOUND 1 /Delaying shutdown to await semi-sync ACK/ in mysqld.1.err
# Validate slave data is in correct state
@@ -144,8 +135,8 @@ COUNT(*)=0
1
#
# Test Case 2) If both replicas simulate an error before sending an ACK,
# the primary should delay killing the suspended thread until the
# timeout is reached (Rpl_semi_sync_master_no_tx should be 1).
# the primary should delay killing the Ack_thread until the
# timeout is reached.
#
connection server_1;
#--
@@ -188,8 +179,6 @@ SET @@GLOBAL.debug_dbug= "+d,corrupt_queue_event,delay_semisync_kill_connection_
#--
#-- Test begins
connection server_1_con2;
#-- Give enough time after timeout/ack received to query yes_tx/no_tx
SET @@GLOBAL.debug_dbug= "+d,delay_shutdown_phase_2_after_semisync_wait";
connection server_1;
#-- Begin semi-sync transaction
INSERT INTO t1 VALUES (1);
@@ -198,14 +187,7 @@ connection server_1_con2;
#-- Begin master shutdown
SHUTDOWN WAIT FOR ALL SLAVES;
connection server_1;
#-- Ensure either ACK was received (yes_tx=1) or timeout (no_tx=1)
show status like 'Rpl_semi_sync_master_yes_tx';
Variable_name Value
Rpl_semi_sync_master_yes_tx 0
show status like 'Rpl_semi_sync_master_no_tx';
Variable_name Value
Rpl_semi_sync_master_no_tx 1
connection server_1_con2;
ERROR HY000: Lost connection to server during query
# Check logs to ensure shutdown was delayed
FOUND 2 /Delaying shutdown to await semi-sync ACK/ in mysqld.1.err
# Validate slave data is in correct state
@@ -267,8 +249,8 @@ COUNT(*)=0
#
# Test Case 3) If one replica simulates a delay within the allowed
# timeout and the other simulates an error before sending an ACK, the
# primary should delay killing the suspended thread until it receives an
# ACK from the delayed slave (Rpl_semi_sync_master_yes_tx should be 1).
# primary should delay killing the Ack_thread until it receives an
# ACK from the delayed slave.
#
connection server_1;
#--
@@ -311,8 +293,6 @@ SET @@GLOBAL.debug_dbug= "+d,simulate_delay_semisync_slave_reply";
#--
#-- Test begins
connection server_1_con2;
#-- Give enough time after timeout/ack received to query yes_tx/no_tx
SET @@GLOBAL.debug_dbug= "+d,delay_shutdown_phase_2_after_semisync_wait";
connection server_1;
#-- Begin semi-sync transaction
INSERT INTO t1 VALUES (1);
@@ -321,14 +301,7 @@ connection server_1_con2;
#-- Begin master shutdown
SHUTDOWN WAIT FOR ALL SLAVES;
connection server_1;
#-- Ensure either ACK was received (yes_tx=1) or timeout (no_tx=1)
show status like 'Rpl_semi_sync_master_yes_tx';
Variable_name Value
Rpl_semi_sync_master_yes_tx 1
show status like 'Rpl_semi_sync_master_no_tx';
Variable_name Value
Rpl_semi_sync_master_no_tx 0
connection server_1_con2;
ERROR HY000: Lost connection to server during query
# Check logs to ensure shutdown was delayed
FOUND 3 /Delaying shutdown to await semi-sync ACK/ in mysqld.1.err
# Validate slave data is in correct state
@@ -391,8 +364,7 @@ COUNT(*)=0
# active semi-sync connection in-tact. The slave should notice this, and
# not issue a `QUIT` command to the primary, which would otherwise be
# sent to kill an active connection. This test case validates that the
# slave does not send a `QUIT` in this case (Rpl_semi_sync_master_yes_tx
# should be 1 because server_3 will send the ACK within a valid timeout).
# slave does not send a `QUIT` in this case.
#
connection server_1;
#--
@@ -435,8 +407,6 @@ SET @@GLOBAL.debug_dbug= "+d,simulate_delay_semisync_slave_reply";
#--
#-- Test begins
connection server_1_con2;
#-- Give enough time after timeout/ack received to query yes_tx/no_tx
SET @@GLOBAL.debug_dbug= "+d,delay_shutdown_phase_2_after_semisync_wait";
connection server_1;
#-- Begin semi-sync transaction
INSERT INTO t1 VALUES (1);
@@ -445,14 +415,7 @@ connection server_1_con2;
#-- Begin master shutdown
SHUTDOWN WAIT FOR ALL SLAVES;
connection server_1;
#-- Ensure either ACK was received (yes_tx=1) or timeout (no_tx=1)
show status like 'Rpl_semi_sync_master_yes_tx';
Variable_name Value
Rpl_semi_sync_master_yes_tx 1
show status like 'Rpl_semi_sync_master_no_tx';
Variable_name Value
Rpl_semi_sync_master_no_tx 0
connection server_1_con2;
ERROR HY000: Lost connection to server during query
# Check logs to ensure shutdown was delayed
FOUND 4 /Delaying shutdown to await semi-sync ACK/ in mysqld.1.err
# Validate slave data is in correct state
@@ -506,16 +469,60 @@ Rpl_semi_sync_slave_status OFF
SELECT COUNT(*)=0 from t1;
COUNT(*)=0
1
#
# Test Case 5) If a waiting-for-ACK user thread is killed (disconnected)
# during SHUTDOWN WAIT FOR ALL SLAVES, ensure the primary will still
# await the ACK from the replica before killing the Ack_receiver thread
#
connection server_1;
insert into t1 values (1);
include/save_master_gtid.inc
connection server_2;
include/sync_with_master_gtid.inc
include/stop_slave.inc
SET GLOBAL rpl_semi_sync_slave_enabled= 1;
include/start_slave.inc
connection server_1;
SET GLOBAL rpl_semi_sync_master_enabled= 1;
SET GLOBAL rpl_semi_sync_master_timeout= 2000;
show status like 'Rpl_semi_sync_master_status';
Variable_name Value
Rpl_semi_sync_master_status ON
show status like 'Rpl_semi_sync_master_clients';
Variable_name Value
Rpl_semi_sync_master_clients 1
connection server_2;
SET @old_dbug= @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug="+d,simulate_delay_semisync_slave_reply";
connect con1, localhost, root,,;
connect con2, localhost, root,,;
connection con1;
insert into t1 values (2);
connection server_1;
# Wait for thd to begin semi-sync wait..
# ..done
disconnect con1;
connection default;
connection con2;
SHUTDOWN WAIT FOR ALL SLAVES;
connection server_2;
include/assert_grep.inc [Ensure the primary waited for the ACK of the killed thread]
connection default;
connection server_1;
connection server_2;
include/stop_slave.inc
connection server_3;
include/stop_slave.inc
connection default;
connection server_1;
#############################
# Cleanup
#############################
connection server_2;
include/stop_slave.inc
SET @@GLOBAL.rpl_semi_sync_slave_enabled = @sav_enabled_server_2;
SET @@GLOBAL.debug_dbug= @sav_server_2_dbug;
include/start_slave.inc
connection server_3;
include/stop_slave.inc
SET @@GLOBAL.rpl_semi_sync_slave_enabled = @sav_enabled_server_3;
SET @@GLOBAL.debug_dbug= @sav_server_3_dbug;
include/start_slave.inc

View File

@@ -2,6 +2,9 @@ include/master-slave.inc
[connection master]
call mtr.add_suppression("Replication event checksum verification failed");
call mtr.add_suppression("could not queue event from master");
call mtr.add_suppression("Semisync ack receiver.*error reading communication packets");
call mtr.add_suppression("Semisync ack receiver got hangup");
connection slave;
#
# Set up a semisync connection
connection master;

View File

@@ -0,0 +1,75 @@
include/master-slave.inc
[connection master]
*
* The purpose of this test is to prevent incorrect additions to SHOW
* SLAVE STATUS, which has happened several times in the past.
*
* We must never, _ever_, add extra rows to this output of SHOW SLAVE
* STATUS, except at the very end, as this breaks backwards compatibility
* with applications or scripts that parse the output. This also means that
* we cannot add _any_ new rows in a GA version if a different row was
* already added in a later MariaDB version, as this would make it impossible
* to merge the change up while preserving the order of rows.
*
connection slave;
SHOW SLAVE STATUS;
Slave_IO_State #
Master_Host #
Master_User #
Master_Port #
Connect_Retry #
Master_Log_File #
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File #
Slave_IO_Running #
Slave_SQL_Running #
Replicate_Do_DB #
Replicate_Ignore_DB #
Replicate_Do_Table #
Replicate_Ignore_Table #
Replicate_Wild_Do_Table #
Replicate_Wild_Ignore_Table #
Last_Errno #
Last_Error #
Skip_Counter #
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition #
Until_Log_File #
Until_Log_Pos #
Master_SSL_Allowed #
Master_SSL_CA_File #
Master_SSL_CA_Path #
Master_SSL_Cert #
Master_SSL_Cipher #
Master_SSL_Key #
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert #
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno #
Last_SQL_Error #
Replicate_Ignore_Server_Ids #
Master_Server_Id #
Master_SSL_Crl #
Master_SSL_Crlpath #
Using_Gtid #
Gtid_IO_Pos #
Replicate_Do_Domain_Ids #
Replicate_Ignore_Domain_Ids #
Parallel_Mode #
SQL_Delay #
SQL_Remaining_Delay #
Slave_SQL_Running_State #
Slave_DDL_Groups #
Slave_Non_Transactional_Groups #
Slave_Transactional_Groups #
Replicate_Rewrite_DB #
*
* When modifying this test after adding a column to SHOW SLAVE STATUS,
* _only_ additions at the end are allowed, the column number of existing
* columns must _not_ change!
*
include/rpl_end.inc

View File

@@ -3,8 +3,6 @@ include/master-slave.inc
connection slave;
stop slave;
change master to master_use_gtid= current_pos;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
SET GLOBAL slave_parallel_threads=4;
set global slave_parallel_mode=optimistic;
set global gtid_strict_mode=1;
@@ -96,8 +94,6 @@ include/start_slave.inc
connection slave;
stop slave;
change master to master_use_gtid= current_pos;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
SET GLOBAL slave_parallel_threads=4;
set global slave_parallel_mode=optimistic;
set global gtid_strict_mode=1;
@@ -189,8 +185,6 @@ include/start_slave.inc
connection slave;
stop slave;
change master to master_use_gtid= current_pos;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
SET GLOBAL slave_parallel_threads=4;
set global slave_parallel_mode=optimistic;
set global gtid_strict_mode=1;
@@ -321,8 +315,6 @@ include/start_slave.inc
connection slave;
stop slave;
change master to master_use_gtid= current_pos;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
SET GLOBAL slave_parallel_threads=4;
set global slave_parallel_mode=optimistic;
set global gtid_strict_mode=1;
@@ -414,8 +406,6 @@ include/start_slave.inc
connection slave;
stop slave;
change master to master_use_gtid= current_pos;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
SET GLOBAL slave_parallel_threads=4;
set global slave_parallel_mode=optimistic;
set global gtid_strict_mode=1;

View File

@@ -58,8 +58,6 @@ include/start_slave.inc
# to its default of Slave_Pos after RESET SLAVE.
include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=Current_Pos;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
include/start_slave.inc
include/stop_slave.inc
RESET SLAVE;

View File

@@ -1,6 +1,5 @@
include/master-slave.inc
[connection master]
call mtr.add_suppression("Master is configured to log replication events");
connection slave;
connection slave;
include/wait_for_slave_to_stop.inc

View File

@@ -0,0 +1,77 @@
if (!$SERVER_AUDIT2_SO) {
skip No SERVER_AUDIT2 plugin;
}
source include/master-slave.inc;
--disable_warnings
drop table if exists t1;
sync_slave_with_master;
reset master;
--enable_warnings
--disable_warnings
CREATE TABLE IF NOT EXISTS mysql.server_audit_filters (
filtername char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
rule longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT 'true' CHECK (json_valid(rule)),
CONSTRAINT c_filtername UNIQUE (filtername)
) ENGINE=Aria;
CREATE TABLE IF NOT EXISTS mysql.server_audit_users (host char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
user char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
filtername char(80) NOT NULL DEFAULT '',
CONSTRAINT c_host_user UNIQUE (host, user)
) ENGINE=Aria;
--enable_warnings
INSERT INTO mysql.server_audit_filters VALUES ('ignore_sys', '{"ignore_tables" : "mysql.*"}');
INSERT INTO mysql.server_audit_users VALUES ('%','<replication_slave>','ignore_sys');
INSERT INTO mysql.server_audit_users VALUES ('%','root','ignore_sys');
install plugin server_audit soname 'server_audit2';
set global server_audit_logging=on;
# this is done to make test deterministic
# so the above 'set' command is always logged before the 'create table t1'
-- disable_query_log
-- disable_result_log
select * from mysql.server_audit_filters;
select * from mysql.server_audit_users;
-- enable_result_log
-- enable_query_log
connection master;
create table t1 (a int);
insert into t1 values (1);
truncate t1;
drop table t1;
sync_slave_with_master;
set global server_audit_logging=off;
truncate mysql.server_audit_filters;
truncate mysql.server_audit_users;
INSERT INTO mysql.server_audit_filters VALUES ('no_logging','false');
INSERT INTO mysql.server_audit_users VALUES ('%','<replication_slave>','no_logging');
set global server_audit_logging=on;
connection master;
create table t1 (a int);
insert into t1 values (1);
truncate t1;
drop table t1;
sync_slave_with_master;
set global server_audit_logging=off;
uninstall plugin server_audit;
truncate mysql.server_audit_filters;
truncate mysql.server_audit_users;
let $MYSQLD_DATADIR= `SELECT @@datadir`;
# replace the timestamp and the hostname with constant values
--replace_regex /[0-9]* [0-9][0-9]:[0-9][0-9]:[0-9][0-9]\,[^,]*\,/TIME,HOSTNAME,/ /\,[1-9][0-9]*\,/,1,/ /\,[1-9][0-9]*/,ID/ /000001\\', [0-9]*,/#', POS,/
cat_file $MYSQLD_DATADIR/server_audit.log;
remove_file $MYSQLD_DATADIR/server_audit.log;
connection master;
--source include/rpl_end.inc

View File

@@ -39,6 +39,7 @@
--source include/master-slave.inc
--connection master
SET @org_log_warnings=@@GLOBAL.LOG_WARNINGS;
SET GLOBAL LOG_WARNINGS=2;
--connection slave
@@ -110,6 +111,7 @@ CHANGE MASTER TO MASTER_USE_GTID=slave_pos;
--source include/wait_for_pattern_in_file.inc
--echo "===== Clean up ====="
SET GLOBAL LOG_WARNINGS=@org_log_warnings;
--connection slave
--source include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=no;
@@ -117,5 +119,4 @@ CHANGE MASTER TO MASTER_USE_GTID=no;
--connection master
DROP TABLE t;
SET GLOBAL LOG_WARNINGS=default;
--source include/rpl_end.inc

View File

@@ -109,9 +109,4 @@ CHANGE MASTER TO MASTER_USER='root', MASTER_SSL=0, MASTER_SSL_CA='', MASTER_SSL_
CHANGE MASTER TO MASTER_USER='root', MASTER_PASSWORD='', MASTER_SSL=0;
# MDEV-20122: Deprecate MASTER_USE_GTID=Current_Pos to favor new MASTER_DEMOTE_TO_SLAVE option
--echo "Usage of CURRENT_POS in CHANGE MASTER MASTER_USE_GTID is dreprecated.
CHANGE MASTER TO MASTER_USE_GTID=CURRENT_POS;
CHANGE MASTER TO MASTER_USE_GTID=SLAVE_POS;
--source include/rpl_end.inc

View File

@@ -6,9 +6,12 @@
connection master;
--disable_query_log
call mtr.add_suppression("mysqld: Table '.*gtid_slave_pos' is marked as crashed and should be repaired");
call mtr.add_suppression("Checking table: './mysql/gtid_slave_pos'");
call mtr.add_suppression("mysql.gtid_slave_pos: 1 client is using or hasn't closed the table properly");
call mtr.add_suppression("Could not read packet:.* errno: 11");
--enable_query_log
SET @@session.gtid_domain_id= 0;
create table ti (a int auto_increment primary key) engine=innodb;

View File

@@ -30,6 +30,10 @@
--let $rpl_skip_start_slave=1
--source include/master-slave.inc
--disable_query_log
call mtr.add_suppression("Could not read packet:.* errno: 11");
--enable_query_log
# Do an insert on master
CREATE TABLE t1(a int);
INSERT INTO t1 VALUES(1);

View File

@@ -1,6 +1,17 @@
source include/master-slave.inc;
--disable_query_log
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
call mtr.add_suppression("Could not read packet:.* errno: 11 ");
# The following one comes from calling dirty_close on client side
call mtr.add_suppression("Could not read packet:.* errno: 2 ");
call mtr.add_suppression("Could not read packet:.* errno: 35 ");
--enable_query_log
let $org_log_warnings=`select @@global.log_warnings`;
# Test extended warnings
SET GLOBAL LOG_WARNINGS=4;
create table t1(n int);
# Use of get_lock gives a warning for unsafeness if binlog_format=statement
@@ -41,6 +52,10 @@ connection master1;
drop table t1;
sync_slave_with_master;
connection default;
--disable_query_log
--eval SET GLOBAL LOG_WARNINGS=$org_log_warnings;
--enable_query_log
--source include/rpl_end.inc

View File

@@ -12,6 +12,7 @@
call mtr.add_suppression("Checking table:");
call mtr.add_suppression("client is using or hasn't closed the table properly");
call mtr.add_suppression("Table .* is marked as crashed and should be repaired");
call mtr.add_suppression("Could not read packet:.* errno: 11");
flush tables;
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;

View File

@@ -5,6 +5,10 @@
--let $rpl_topology=1->2
--source include/rpl_init.inc
--disable_query_log
call mtr.add_suppression("Could not read packet:.* errno: 11");
--enable_query_log
--echo *** Test crashing master with InnoDB disabled, the binlog gtid state should still be correctly recovered. ***
--connection server_1

View File

@@ -93,5 +93,4 @@ CHANGE MASTER TO MASTER_USE_GTID=no;
--connection master
DROP TABLE t;
SET GLOBAL LOG_WARNINGS=default;
--source include/rpl_end.inc

View File

@@ -3,6 +3,12 @@
--source include/have_debug.inc
--source include/master-slave.inc
--disable_query_log
CALL mtr.add_suppression('SET @master_heartbeat_period to master failed with error');
CALL mtr.add_suppression('Master command COM_REGISTER_SLAVE failed: failed registering on master, reconnecting to try again');
call mtr.add_suppression("Could not read packet:.* errno: 11");
--enable_query_log
connection slave;
--source include/stop_slave.inc
set @restore_slave_net_timeout= @@global.slave_net_timeout;
@@ -14,14 +20,13 @@ set @@global.slave_net_timeout= 10;
### Checking the range
###
#
# default period slave_net_timeout/2
#
--query_vertical show status like 'Slave_heartbeat_period';
SET @saved_dbug= @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug="+d,simulate_slave_heartbeat_network_error";
CALL mtr.add_suppression('SET @master_heartbeat_period to master failed with error');
CALL mtr.add_suppression('Master command COM_REGISTER_SLAVE failed: failed registering on master, reconnecting to try again');
--source include/start_slave.inc

View File

@@ -20,6 +20,9 @@ source include/master-slave.inc;
call mtr.add_suppression("Slave I/O: Got a packet bigger than 'slave_max_allowed_packet' bytes, .*error.* 1153");
call mtr.add_suppression("Log entry on master is longer than slave_max_allowed_packet");
call mtr.add_suppression("Could not write packet:");
call mtr.add_suppression("Got a packet bigger than 'max_allowed_packet' bytes");
let $db= DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________;
disable_warnings;
eval drop database if exists $db;

View File

@@ -508,6 +508,7 @@ DELETE FROM t2;
# The 1st of the following two trx:s a blocker on slave
--connection server_2
SET @org_log_warnings=@@GLOBAL.LOG_WARNINGS;
set global log_warnings=2;
BEGIN;
INSERT INTO t1 SET a=1;
@@ -555,7 +556,7 @@ DELETE FROM t2;
#
--connection server_2
--source include/stop_slave.inc
set global log_warnings=default;
set global log_warnings=@org_log_warnings;
SET GLOBAL slave_parallel_mode=@old_parallel_mode;
SET GLOBAL slave_parallel_threads=@old_parallel_threads;
--source include/start_slave.inc

View File

@@ -206,7 +206,6 @@ while($i > 0)
#
--connection slave
--source include/stop_slave.inc
set global log_warnings=default;
SET GLOBAL slave_parallel_mode=@old_parallel_mode;
SET GLOBAL slave_parallel_threads=@old_parallel_threads;
--source include/start_slave.inc

View File

@@ -410,6 +410,44 @@ DROP function foo;
--sync_slave_with_master server_2
#
# MDEV-33303: slave_parallel_mode=optimistic should not report the mode's
# specific temporary errors.
#
--connection server_2
--source include/stop_slave.inc
SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
SET GLOBAL slave_parallel_threads=4;
--connection server_1
# The problem occurred in the code path for row-based updates in tables
# with no primary/unique key, where a scan is needed.
CREATE TABLE t1 (a INT, b VARCHAR(123)) ENGINE=InnoDB;
INSERT INTO t1 VALUES(1, 'asdf');
UPDATE t1 SET b='zxf1' WHERE a=1;
UPDATE t1 SET b='\n' WHERE a=1;
--connection server_2
# Inject a small sleep in the code that makes the race easier to hit.
SET @old_dbug=@@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug="+d,write_row_inject_sleep_before_ha_write_row";
--source include/start_slave.inc
--connection server_1
# Here, we would get errors in the slave's error log:
# [ERROR] mariadbd: Can't find record in 't1'
--sync_slave_with_master server_2
--connection server_1
DROP TABLE t1;
--sync_slave_with_master server_2
--source include/stop_slave.inc
SET GLOBAL debug_dbug=@old_dbug;
SET GLOBAL slave_parallel_threads=@old_parallel_threads;
--source include/start_slave.inc
#
# MDEV-12746 rpl.rpl_parallel_optimistic_nobinlog fails committing out of order at retry
#

View File

@@ -67,6 +67,13 @@ if (`SELECT $sbm_trx1_arrive > ($seconds_since_idling + 1)`)
--echo # if the event is still to be delayed, SBM should resume accordingly
--source include/stop_slave.inc
--echo # Lock t1 on slave to ensure the event can't finish (and thereby update
--echo # Seconds_Behind_Master) so slow running servers don't accidentally
--echo # catch up to the master before checking SBM.
--connection server_2
LOCK TABLES t1 WRITE;
--source include/start_slave.inc
--connection slave
@@ -86,6 +93,9 @@ if (`SELECT $sbm_trx1_after_1s_sleep <= $sbm_trx1_arrive`)
}
--echo # ..done
--connection server_2
UNLOCK TABLES;
--source include/sync_with_master_gtid.inc
--echo #

View File

@@ -57,6 +57,7 @@ COMMIT;
INSERT INTO t3 VALUES(21, 21);
INSERT INTO t3 VALUES(22, 22);
--save_master_pos
--let $master_pos= query_get_value(SHOW MASTER STATUS, Position, 1)
# Start a connection that will block the replicated transaction halfway.
--connection con_temp1
@@ -64,7 +65,27 @@ BEGIN;
INSERT INTO t2 VALUES (21);
--connection server_2
START SLAVE;
#
# Parallel replication will complete any in-progress event group at STOP SLAVE,
# but only if the event group is already queued up for the worker thread. If
# the SQL driver thread is delayed in queueing up events, the parallel worker
# thread can abort the event group, leaving the non-transactional update to the
# MyISAM table that cannot be rolled back (MDEV-7432). If this happens the test
# would fail with duplicate key error after slave restart.
#
# To avoid this, we here wait for the IO thread to read all master events, and
# for the SQL driver thread to queue all the events for workers. This wait
# should be removed if/when MDEV-7432 is fixed.
#
START SLAVE IO_THREAD;
--let $slave_param= Read_Master_Log_Pos
--let $slave_param_value= $master_pos
--source include/wait_for_slave_param.inc
START SLAVE SQL_THREAD;
--let $wait_condition= SELECT COUNT(*)=1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE State LIKE '%Slave has read all relay log; waiting for more updates%'
--source include/wait_condition.inc
# Wait for the MyISAM change to be visible, after which replication will wait
# for con_temp1 to roll back.
--let $wait_condition= SELECT COUNT(*) = 1 FROM t1 WHERE a=20

View File

@@ -264,6 +264,30 @@ SET GLOBAL slave_parallel_mode=@old_mode;
--source include/start_slave.inc
--echo *** MDEV33426: Memory allocation accounting incorrect for replicated temptable
--connection server_1
CREATE TEMPORARY TABLE t5 (a int) ENGINE=Aria;
CREATE TEMPORARY TABLE t6 (a int) ENGINE=Heap;
INSERT INTO t5 VALUES (1);
INSERT INTO t6 VALUES (2);
--save_master_pos
--connection server_2
--sync_with_master
--source include/stop_slave.inc
--connection server_1
INSERT INTO t1 SELECT a+40, 5 FROM t5;
INSERT INTO t1 SELECT a+40, 6 FROM t6;
DROP TABLE t5, t6;
--save_master_pos
--connection server_2
--source include/start_slave.inc
--sync_with_master
SELECT * FROM t1 WHERE a>=40 ORDER BY a;
# Clean up.
--connection server_2

View File

@@ -51,7 +51,9 @@ DROP TABLE t1;
# cleanup
--source include/stop_slave.inc
SET @@GLOBAL.debug_dbug = @saved_dbug;
--disable_query_log
--eval SET GLOBAL log_warnings = $log_warnings_save
--enable_query_log
--source include/start_slave.inc
--source include/rpl_end.inc

View File

@@ -0,0 +1,10 @@
!include ../my.cnf
[mysqld.1]
log-warnings=9
rpl_semi_sync_master_enabled=1
rpl_semi_sync_master_wait_point=AFTER_COMMIT
[mysqld.2]
log-warnings=9
rpl_semi_sync_slave_enabled=1

View File

@@ -0,0 +1,77 @@
#
# This test ensures that, when using semi-sync with the wait_point
# AFTER_COMMIT, each thread awaiting an ACK is only woken up when its ACK (or
# an ACK for a later commit in binlog) has been received from the slave.
#
# Prior to MDEV-33551, all threads would be woken up for each ACK received,
# leading to large slowdowns, as each thread would check if the ACK was for it
# in mutual exclusion from the others.
#
# To ensure this, a debug-build-only log warning is added into
# Repl_semi_sync_master::commit_trx() at wakeup time, which will complain if
# the awoken thread's binlog wait coordinates are after the coordinate of the
# last ACK coordinates. Then, we use binlog group commit to commit a series of
# transactions, such that each will await an ACK concurrently. After all
# transactions have been finished (i.e. ACKed and committed), we check the log
# for the expected absence of the added debug warning message.
#
#
# References:
# MDEV-33551: Semi-sync Wait Point AFTER_COMMIT Slow on Workloads with Heavy
# Concurrency
#
--source include/have_binlog_format_row.inc
--source include/have_debug.inc
--source include/master-slave.inc
--connection master
call mtr.add_suppression("Got an error reading communication packets");
set @save_bgc_count= @@global.binlog_commit_wait_count;
set @save_bgc_usec= @@global.binlog_commit_wait_usec;
set @save_debug_dbug= @@global.debug_dbug;
set @@global.binlog_commit_wait_count=3;
set @@global.binlog_commit_wait_usec=10000000;
set @@global.debug_dbug="+d,testing_cond_var_per_thd";
--echo # Ensure semi-sync is on
--connection slave
let $status_var= rpl_semi_sync_slave_status;
let $status_var_value= ON;
source include/wait_for_status_var.inc;
--connection master
let $status_var= rpl_semi_sync_master_status;
let $status_var_value= ON;
source include/wait_for_status_var.inc;
--echo # Create three transactions to binlog group commit together
--connection master
--send create table t1 (a int)
--connection server_1
--send create table t2 (a int)
--connection default
--send create table t3 (a int)
--connection master
--reap
--connection server_1
--reap
--connection default
--reap
--let $assert_text= Check that there is no 'Thread awaiting semi-sync ACK was awoken before its ACK' warning in error log.
--let $assert_select=Thread awaiting semi-sync ACK was awoken before its ACK
--let $assert_file= $MYSQLTEST_VARDIR/log/mysqld.1.err
--let $assert_count= 0
--let $assert_only_after=CURRENT_TEST
--source include/assert_grep.inc
--echo #
--echo # Cleanup
--connection master
set @@global.binlog_commit_wait_count=@save_bgc_count;
set @@global.binlog_commit_wait_usec=@save_bgc_usec;
set @@global.debug_dbug=@save_debug_dbug;
drop table t1, t2, t3;
--source include/rpl_end.inc

View File

@@ -81,6 +81,20 @@ SELECT @@GLOBAL.gtid_current_pos;
--enable_reconnect
--source include/wait_until_connected_again.inc
--let $slave_semi_sync_enabled= query_get_value(SHOW VARIABLES LIKE 'Rpl_semi_sync_slave_enabled', Value, 1)
--echo # Ensuring variable rpl_semi_sync_slave_enabled is ON..
if (`SELECT strcmp("ON", "$slave_semi_sync_enabled") != 0`)
{
--die Slave started with rpl_semi_sync_slave_enabled=1 yet it is OFF in the variable output
}
--let $slave_semi_sync_status= query_get_value(SHOW STATUS LIKE 'Rpl_semi_sync_slave_status', Value, 1)
--echo # Ensuring status rpl_semi_sync_slave_status is OFF..
if (`SELECT strcmp("OFF", "$slave_semi_sync_status") != 0`)
{
--die Slave started with skip-slave-start yet started with rpl_semi_sync_slave_status=ON
}
--let $assert_cond= COUNT(*) = $expected_rows_on_master FROM t1
--let $assert_text= Table t1 should have $expected_rows_on_master rows.
--source include/assert.inc

View File

@@ -10,6 +10,11 @@
--source include/have_binlog_format_row.inc
--source include/master-slave.inc
--disable_query_log
call mtr.add_suppression("Could not read packet:.* errno: 11");
flush tables;
--enable_query_log
# Initial slave
--connection server_2
--source include/stop_slave.inc

View File

@@ -1,13 +1,13 @@
!include ../my.cnf
[mysqld.1]
log_warnings=9
log_warnings=3
[mysqld.2]
log_warnings=9
log_warnings=3
[mysqld.3]
log_warnings=9
log_warnings=3
[ENV]
SERVER_MYPORT_3= @mysqld.3.port

View File

@@ -64,9 +64,6 @@ show status like 'Rpl_semi_sync_master_clients';
--echo #-- Test begins
--connection server_1_con2
--echo #-- Give enough time after timeout/ack received to query yes_tx/no_tx
SET @@GLOBAL.debug_dbug= "+d,delay_shutdown_phase_2_after_semisync_wait";
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
wait
EOF
@@ -82,15 +79,11 @@ let $status_var_value= 1;
source include/wait_for_status_var.inc;
--echo #-- Begin master shutdown
--send SHUTDOWN WAIT FOR ALL SLAVES
SHUTDOWN WAIT FOR ALL SLAVES;
--source include/wait_until_disconnected.inc
--connection server_1
--reap
--echo #-- Ensure either ACK was received (yes_tx=1) or timeout (no_tx=1)
show status like 'Rpl_semi_sync_master_yes_tx';
show status like 'Rpl_semi_sync_master_no_tx';
--connection server_1_con2
--error 2013
--reap
--source include/wait_until_disconnected.inc

View File

@@ -5,7 +5,7 @@
# This test validates that data is consistent between a primary and replica
# in semi-sync mode when the primary is issued `SHUTDOWN WAIT FOR SLAVES`
# during an active communication. More specifically, the primary should not
# kill the connection until it is sure a replica has received all binlog
# kill the Ack_thread until it is sure a replica has received all binlog
# data, i.e. once the primary receives the ACK. If a primary is issued a
# shutdown before receiving an ACK, it should wait until either 1) the ACK is
# received, or 2) the configured timeout (rpl_semi_sync_master_timeout) is
@@ -15,23 +15,18 @@
# Using a topology consisting of one primary with two replicas, all in
# semi-sync mode, we use DEBUG_DBUG to simulate an error or delay on the
# replicas during an active communication while the primary is issued
# `SHUTDOWN WAIT FOR SLAVES`. We create four test cases to ensure the primary
# will correctly wait for the communication to finish, and use the semi-sync
# status variables Rpl_semi_sync_master_yes_tx and Rpl_semi_sync_master_no_tx
# to ensure the connection was not prematurely killed due to the shutdown.
# `SHUTDOWN WAIT FOR SLAVES`. We create four test cases to ensure the
# Ack_thread is not prematurely killed due to the shutdown.
# Test Case 1) If both replicas simulate a delay that is within the allowed
# timeout, the primary should delay killing the suspended thread
# until an ACK is received (Rpl_semi_sync_master_yes_tx should
# be 1).
# timeout, the primary should delay killing the Ack_thread
# until an ACK is received.
# Test Case 2) If both replicas simulate an error before sending an ACK, the
# primary should delay killing the suspended thread until the
# the timeout is reached (Rpl_semi_sync_master_no_tx should be
# 1).
# primary should delay killing the Ack_thread until the
# the timeout is reached.
# Test Case 3) If one replica simulates a delay within the allowed timeout
# and the other simulates an error before sending an ACK, the
# primary should delay killing the suspended thread until it
# receives an ACK from the delayed slave
# (Rpl_semi_sync_master_yes_tx should be 1).
# primary should delay killing the Ack_thread until it
# receives an ACK from the delayed slave.
# Test Case 4) If a replica errors before sending an ACK, it will cause the
# IO thread to stop and handle the error. During error handling,
# if semi-sync is active, the replica will form a new connection
@@ -41,9 +36,11 @@
# slave should notice this, and not issue a `QUIT` command to
# the primary, which would otherwise be sent to kill an active
# connection. This test case validates that the slave does not
# send a `QUIT` in this case (Rpl_semi_sync_master_yes_tx should
# be 1 because server_3 will send the ACK within a valid
# timeout).
# send a `QUIT` in this case.
# Test Case 5) If a waiting-for-ACK user thread is killed (disconnected)
# during SHUTDOWN WAIT FOR ALL SLAVES, ensure the primary will
# still await the ACK from the replica before killing the
# Ack_thread.
#
# References:
# MDEV-11853: semisync thread can be killed after sync binlog but before ACK
@@ -58,6 +55,7 @@
--echo # Note: Simulated slave delay is hardcoded to 800 milliseconds
--echo # Note: Simulated master shutdown delay is hardcoded to 500 milliseconds
--source include/have_innodb.inc
--source include/have_debug.inc
--let $rpl_topology=1->2, 1->3
--source include/rpl_init.inc
@@ -90,7 +88,7 @@ set @sav_enabled_server_3= @@GLOBAL.rpl_semi_sync_slave_enabled;
set @sav_server_3_dbug= @@GLOBAL.debug_dbug;
--connection server_1
CREATE TABLE t1 (a int);
CREATE TABLE t1 (a int) engine=innodb;
--save_master_pos
--let i= 2
@@ -112,8 +110,8 @@ while (`SELECT $i <= $slave_last`)
--echo #
--echo # Test Case 1) If both replicas simulate a delay that is within the
--echo # allowed timeout, the primary should delay killing the suspended thread
--echo # until an ACK is received (Rpl_semi_sync_master_yes_tx should be 1).
--echo # allowed timeout, the primary should delay killing the Ack_thread
--echo # until an ACK is received.
--echo #
--let server_2_dbug= "+d,simulate_delay_semisync_slave_reply"
--let server_3_dbug= "+d,simulate_delay_semisync_slave_reply"
@@ -124,8 +122,8 @@ while (`SELECT $i <= $slave_last`)
--echo #
--echo # Test Case 2) If both replicas simulate an error before sending an ACK,
--echo # the primary should delay killing the suspended thread until the
--echo # timeout is reached (Rpl_semi_sync_master_no_tx should be 1).
--echo # the primary should delay killing the Ack_thread until the
--echo # timeout is reached.
--echo #
--let server_2_dbug= "+d,corrupt_queue_event,delay_semisync_kill_connection_for_mdev_28141"
--let server_3_dbug= "+d,corrupt_queue_event,delay_semisync_kill_connection_for_mdev_28141"
@@ -137,8 +135,8 @@ while (`SELECT $i <= $slave_last`)
--echo #
--echo # Test Case 3) If one replica simulates a delay within the allowed
--echo # timeout and the other simulates an error before sending an ACK, the
--echo # primary should delay killing the suspended thread until it receives an
--echo # ACK from the delayed slave (Rpl_semi_sync_master_yes_tx should be 1).
--echo # primary should delay killing the Ack_thread until it receives an
--echo # ACK from the delayed slave.
--echo #
--let server_2_dbug= "+d,corrupt_queue_event,delay_semisync_kill_connection_for_mdev_28141"
--let server_3_dbug= "+d,simulate_delay_semisync_slave_reply"
@@ -156,8 +154,7 @@ while (`SELECT $i <= $slave_last`)
--echo # active semi-sync connection in-tact. The slave should notice this, and
--echo # not issue a `QUIT` command to the primary, which would otherwise be
--echo # sent to kill an active connection. This test case validates that the
--echo # slave does not send a `QUIT` in this case (Rpl_semi_sync_master_yes_tx
--echo # should be 1 because server_3 will send the ACK within a valid timeout).
--echo # slave does not send a `QUIT` in this case.
--echo #
--let server_2_dbug= "+d,corrupt_queue_event,delay_semisync_kill_connection_for_mdev_28141"
--let server_3_dbug= "+d,simulate_delay_semisync_slave_reply"
@@ -166,18 +163,108 @@ while (`SELECT $i <= $slave_last`)
--let server_3_expect_row_count= 1
--source rpl_semi_sync_shutdown_await_ack.inc
#
# Added with MDEV-33551
#
--echo #
--echo # Test Case 5) If a waiting-for-ACK user thread is killed (disconnected)
--echo # during SHUTDOWN WAIT FOR ALL SLAVES, ensure the primary will still
--echo # await the ACK from the replica before killing the Ack_receiver thread
--echo #
--connection server_1
insert into t1 values (1);
--source include/save_master_gtid.inc
--connection server_2
--source include/sync_with_master_gtid.inc
--source include/stop_slave.inc
SET GLOBAL rpl_semi_sync_slave_enabled= 1;
--source include/start_slave.inc
--connection server_1
SET GLOBAL rpl_semi_sync_master_enabled= 1;
SET GLOBAL rpl_semi_sync_master_timeout= 2000;
--let $status_var= Rpl_semi_sync_master_clients
--let $status_var_value= 1
source include/wait_for_status_var.inc;
show status like 'Rpl_semi_sync_master_status';
show status like 'Rpl_semi_sync_master_clients';
--connection server_2
SET @old_dbug= @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug="+d,simulate_delay_semisync_slave_reply";
--connect(con1, localhost, root,,)
--connect(con2, localhost, root,,)
--connection con1
--send insert into t1 values (2)
--connection server_1
--echo # Wait for thd to begin semi-sync wait..
--let $wait_condition= SELECT COUNT(*) = 1 FROM information_schema.processlist WHERE state = 'Waiting for semi-sync ACK from slave'
--source include/wait_condition.inc
--source include/wait_condition.inc
--echo # ..done
--disconnect con1
--connection default
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
wait
EOF
--connection con2
SHUTDOWN WAIT FOR ALL SLAVES;
--source include/wait_until_disconnected.inc
# Run assert_grep on server_2 as it uses SQL commands for verification, but
# server_1 has gone away
--connection server_2
--let $assert_text= Ensure the primary waited for the ACK of the killed thread
--let $assert_select= Delaying shutdown to await semi-sync ACK
--let $assert_file= $MYSQLTEST_VARDIR/log/mysqld.1.err
--let $assert_count= 5
--let $assert_only_after=CURRENT_TEST
--source include/assert_grep.inc
--connection default
--source include/wait_until_disconnected.inc
--connection server_1
--source include/wait_until_disconnected.inc
--connection server_2
--let $rpl_allow_error= 1
source include/stop_slave.inc;
--connection server_3
source include/stop_slave.inc;
--let $rpl_allow_error=
--connection default
--append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
restart
EOF
--enable_reconnect
--source include/wait_until_connected_again.inc
--connection server_1
--enable_reconnect
--source include/wait_until_connected_again.inc
--echo #############################
--echo # Cleanup
--echo #############################
--connection server_2
source include/stop_slave.inc;
SET @@GLOBAL.rpl_semi_sync_slave_enabled = @sav_enabled_server_2;
SET @@GLOBAL.debug_dbug= @sav_server_2_dbug;
source include/start_slave.inc;
--connection server_3
source include/stop_slave.inc;
SET @@GLOBAL.rpl_semi_sync_slave_enabled = @sav_enabled_server_3;
SET @@GLOBAL.debug_dbug= @sav_server_3_dbug;
source include/start_slave.inc;

View File

@@ -14,6 +14,9 @@
call mtr.add_suppression("Replication event checksum verification failed");
call mtr.add_suppression("could not queue event from master");
call mtr.add_suppression("Semisync ack receiver.*error reading communication packets");
call mtr.add_suppression("Semisync ack receiver got hangup");
--sync_slave_with_master
--echo #
--echo # Set up a semisync connection

View File

@@ -0,0 +1,27 @@
--source include/have_binlog_format_mixed.inc
--source include/master-slave.inc
--echo *
--echo * The purpose of this test is to prevent incorrect additions to SHOW
--echo * SLAVE STATUS, which has happened several times in the past.
--echo *
--echo * We must never, _ever_, add extra rows to this output of SHOW SLAVE
--echo * STATUS, except at the very end, as this breaks backwards compatibility
--echo * with applications or scripts that parse the output. This also means that
--echo * we cannot add _any_ new rows in a GA version if a different row was
--echo * already added in a later MariaDB version, as this would make it impossible
--echo * to merge the change up while preserving the order of rows.
--echo *
--connection slave
--replace_column 1 # 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 11 # 12 # 13 # 14 # 15 # 16 # 17 # 18 # 19 # 20 # 21 # 22 # 23 # 24 # 25 # 26 # 27 # 28 # 29 # 30 # 31 # 32 # 33 # 34 # 35 # 36 # 37 # 38 # 39 # 40 # 41 # 42 # 43 # 44 # 45 # 46 # 47 # 48 # 49 # 50 # 51 # 52 # 53 # 54 #
query_vertical
SHOW SLAVE STATUS;
--echo *
--echo * When modifying this test after adding a column to SHOW SLAVE STATUS,
--echo * _only_ additions at the end are allowed, the column number of existing
--echo * columns must _not_ change!
--echo *
--source include/rpl_end.inc

View File

@@ -3,7 +3,10 @@
#
--source include/master-slave.inc
--disable_query_log
call mtr.add_suppression("Master is configured to log replication events");
call mtr.add_suppression("Could not read packet:.* errno: 11");
--enable_query_log
--connection slave