summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/rpl/t
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-01 18:15:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-01 18:15:00 +0000
commita2a2e32c02643a0cec111511220227703fda1cd5 (patch)
tree69cc2b631234c2a8e026b9cd4d72676c61c594df /mysql-test/suite/rpl/t
parentReleasing progress-linux version 1:10.11.8-1~progress7.99u1. (diff)
downloadmariadb-a2a2e32c02643a0cec111511220227703fda1cd5.tar.xz
mariadb-a2a2e32c02643a0cec111511220227703fda1cd5.zip
Merging upstream version 1:11.4.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/rpl/t')
-rw-r--r--mysql-test/suite/rpl/t/grant_replication_slave.test2
-rw-r--r--mysql-test/suite/rpl/t/max_binlog_total_size-master.opt5
-rw-r--r--mysql-test/suite/rpl/t/max_binlog_total_size.test58
-rw-r--r--mysql-test/suite/rpl/t/rpl_000010.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_alter_extra_persistent.test177
-rw-r--r--mysql-test/suite/rpl/t/rpl_alter_innodb.test (renamed from mysql-test/suite/rpl/t/rpl_alter_instant.test)0
-rw-r--r--mysql-test/suite/rpl/t/rpl_alter_online_debug.test128
-rw-r--r--mysql-test/suite/rpl/t/rpl_bug26395.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_checksum_cache.test98
-rw-r--r--mysql-test/suite/rpl/t/rpl_circular_semi_sync.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_connection.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_corruption.test6
-rw-r--r--mysql-test/suite/rpl/t/rpl_cross_version-master.opt1
-rw-r--r--mysql-test/suite/rpl/t/rpl_cross_version.test48
-rw-r--r--mysql-test/suite/rpl/t/rpl_ctype_collate_implicit.test60
-rw-r--r--mysql-test/suite/rpl/t/rpl_extra_col_slave_minimal.test44
-rw-r--r--mysql-test/suite/rpl/t/rpl_geometry.test13
-rw-r--r--mysql-test/suite/rpl/t/rpl_gtid_glle_no_terminate.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_gtid_index.test89
-rw-r--r--mysql-test/suite/rpl/t/rpl_gtid_master_promote.test3
-rw-r--r--mysql-test/suite/rpl/t/rpl_gtid_mdev4473.test3
-rw-r--r--mysql-test/suite/rpl/t/rpl_gtid_mdev4485.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_gtid_mdev4820.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_gtid_nobinlog.test6
-rw-r--r--mysql-test/suite/rpl/t/rpl_gtid_until_before_after_gtids.test45
-rw-r--r--mysql-test/suite/rpl/t/rpl_heartbeat.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_heartbeat_ssl.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_invoked_features.test95
-rw-r--r--mysql-test/suite/rpl/t/rpl_ip_mix.cnf3
-rw-r--r--mysql-test/suite/rpl/t/rpl_ip_mix2.cnf3
-rw-r--r--mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6.cnf3
-rw-r--r--mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_ipv6.cnf3
-rw-r--r--mysql-test/suite/rpl/t/rpl_ipv6.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_known_bugs_detection-master.opt2
-rw-r--r--mysql-test/suite/rpl/t/rpl_loaddata_fatal-slave.opt2
-rw-r--r--mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_master_pos_wait.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_mdev33798.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_mysql_upgrade.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_optimistic.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_optimistic_nobinlog.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_perfschema_applier_status_by_worker.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_perfschema_connect_config.test6
-rw-r--r--mysql-test/suite/rpl/t/rpl_rewrite_db_sys_vars.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_rotate_logs.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_4_bytes-master.opt2
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_end_of_statement_loss.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_img.cnf2
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_img_blobs.test8
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_img_eng_full_nodup.cnf1
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_img_eng_full_nodup.test67
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_img_full_nodup.cnf1
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_img_full_nodup.test34
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_img_sequence_full.cnf2
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_img_sequence_full_nodup.cnf21
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_img_sequence_full_nodup.test51
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_img_sequence_min.cnf2
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_img_sequence_noblob.cnf2
-rw-r--r--mysql-test/suite/rpl/t/rpl_semi_sync_cond_var_per_thd.cnf3
-rw-r--r--mysql-test/suite/rpl/t/rpl_semi_sync_cond_var_per_thd.test24
-rw-r--r--mysql-test/suite/rpl/t/rpl_semi_sync_crash.inc2
-rw-r--r--mysql-test/suite/rpl/t/rpl_semi_sync_slave_reply_fail.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_semisync_ali_issues.test11
-rw-r--r--mysql-test/suite/rpl/t/rpl_set_statement_default_master.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_show_slave_hosts.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_skip_incident-master.opt2
-rw-r--r--mysql-test/suite/rpl/t/rpl_slave_shutdown_mdev20821.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_ssl.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_ssl1.test43
-rw-r--r--mysql-test/suite/rpl/t/rpl_start_alter_7.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_start_alter_8.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_start_alter_mysqlbinlog_2.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_start_alter_restart_master.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_start_alter_restart_slave.test10
-rw-r--r--mysql-test/suite/rpl/t/rpl_upgrade_master_info.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_xa.inc2
-rw-r--r--mysql-test/suite/rpl/t/rpl_xa_empty_transaction.cnf2
-rw-r--r--mysql-test/suite/rpl/t/show_status_stop_slave_race-7126.test2
79 files changed, 1057 insertions, 215 deletions
diff --git a/mysql-test/suite/rpl/t/grant_replication_slave.test b/mysql-test/suite/rpl/t/grant_replication_slave.test
index c5aca0a6..d50e8a13 100644
--- a/mysql-test/suite/rpl/t/grant_replication_slave.test
+++ b/mysql-test/suite/rpl/t/grant_replication_slave.test
@@ -33,7 +33,7 @@ drop database mysqltest1;
sync_slave_with_master;
stop slave;
change master to master_user='root';
-start slave;
+source include/start_slave.inc;
source include/rpl_end.inc;
drop user rpl@localhost;
diff --git a/mysql-test/suite/rpl/t/max_binlog_total_size-master.opt b/mysql-test/suite/rpl/t/max_binlog_total_size-master.opt
new file mode 100644
index 00000000..9ba64a44
--- /dev/null
+++ b/mysql-test/suite/rpl/t/max_binlog_total_size-master.opt
@@ -0,0 +1,5 @@
+--log-bin=binary
+--max-binlog-total-size=1500
+--max-binlog-size=4096
+--binlog-format=row
+--slave_connections_needed_for_purge=1
diff --git a/mysql-test/suite/rpl/t/max_binlog_total_size.test b/mysql-test/suite/rpl/t/max_binlog_total_size.test
new file mode 100644
index 00000000..2892d137
--- /dev/null
+++ b/mysql-test/suite/rpl/t/max_binlog_total_size.test
@@ -0,0 +1,58 @@
+--source include/have_binlog_format_row.inc
+--source include/master-slave.inc
+
+
+--echo #
+--echo # MDEV-31404 Implement binlog_space_limit
+--echo #
+
+--echo # Test that master is not deleting binary logs before slave has a
+--echo # chance to digest them
+
+select @@global.max_binlog_total_size;
+select @@global.max_binlog_size;
+
+--connection slave
+STOP SLAVE IO_THREAD;
+--source include/wait_for_slave_io_to_stop.inc
+--connection master
+
+# Kill the dump thread
+let $id=`SELECT id from information_schema.processlist where command='Binlog Dump'`;
+
+if ($id)
+{
+ replace_result $id DUMP_THREAD;
+ eval kill $id;
+ let $wait_condition= SELECT count(*)=0 from information_schema.processlist where command='Killed';
+ source include/wait_condition.inc;
+}
+
+CREATE TABLE `t1` (
+ `v1` int(11) DEFAULT NULL,
+ `v2` varchar(8000) DEFAULT NULL,
+ KEY `v1` (`v1`)
+);
+
+FLUSH LOGS;
+FLUSH LOGS;
+FLUSH LOGS;
+--source include/show_binary_logs.inc
+
+INSERT INTO t1 VALUES (0,repeat("a",3000));
+--source include/show_binary_logs.inc
+
+--connection slave
+START SLAVE IO_THREAD;
+--connection master
+
+--sync_slave_with_master
+--connection master
+
+# Slave is now connected. Next query should remove old binary logs.
+
+DROP TABLE t1;
+--source include/show_binary_logs.inc
+
+# End of 11.4 tests
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_000010.test b/mysql-test/suite/rpl/t/rpl_000010.test
index 9ff2d6c5..27b29017 100644
--- a/mysql-test/suite/rpl/t/rpl_000010.test
+++ b/mysql-test/suite/rpl/t/rpl_000010.test
@@ -17,6 +17,7 @@ select n from t1;
connection master;
drop table t1;
sync_slave_with_master;
+source include/wait_for_slave_to_start.inc;
# End of 4.1 tests
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_alter_extra_persistent.test b/mysql-test/suite/rpl/t/rpl_alter_extra_persistent.test
index 4e604787..e61d0502 100644
--- a/mysql-test/suite/rpl/t/rpl_alter_extra_persistent.test
+++ b/mysql-test/suite/rpl/t/rpl_alter_extra_persistent.test
@@ -20,11 +20,19 @@ insert into t1 values(6);
--sync_slave_with_master
select * from t1 order by a;
+alter table t1 add column z3 int default(a+2);
+--connection master
+insert into t1 values(7);
+insert into t1 values(8);
+
+--sync_slave_with_master
+select * from t1 order by a;
+--connection master
+delete from t1 where a > 6;
--echo #UPDATE query
---connection master
update t1 set a = a+10;
select * from t1 order by a;
@@ -95,12 +103,177 @@ start slave;
--source include/wait_for_slave_sql_to_start.inc
---connection master
+--connection master
--sync_slave_with_master
select * from t1 order by a;
--connection master
select * from t1 order by a;
drop table t1;
+--sync_slave_with_master
+--connection master
+
+set binlog_row_image=minimal;
+
+create table t1(a int primary key auto_increment, b int unique);
+insert into t1 values(1, 1);
+insert into t1 values(2, 2);
+insert into t1 values(3, 3);
+insert into t1 values(4, 4);
+insert into t1 values(5, 5);
+
+--sync_slave_with_master
+alter table t1 add column d1 int default (b),
+ add column z1 int as (b+1) virtual,
+ add column z2 int as (b+2) persistent;
+--connection master
+
+insert into t1 values(6, 6);
+update t1 set a = 11 where a = 1;
+update t1 set b = 12 where b = 2;
+
+delete from t1 where a = 3;
+delete from t1 where b = 5;
+
+update t1 set b = 16 where a = 6;
+
+--sync_slave_with_master
+select * from t1;
+
+--echo # Cleanup
+--connection master
+drop table t1;
+--sync_slave_with_master
+--connection master
+
+
+set binlog_row_image=minimal;
+
+--echo #
+--echo # MDEV-29069 ER_KEY_NOT_FOUND upon online autoinc addition and
+--echo # concurrent DELETE
+--echo #
+
+create or replace table t (a int);
+insert into t values (10),(20),(30);
+
+--sync_slave_with_master
+alter table t add pk int auto_increment primary key;
+
+--connection master
+delete from t where a = 20;
+update t set a = a + 1 where a = 10;
+--sync_slave_with_master
+select * from t;
+--connection master
+
+--echo #
+--echo # Add clumsy DEFAULT
+--echo #
+create or replace table t (a int);
+insert into t values (10),(20),(30);
+
+--sync_slave_with_master
+alter table t add b int default(RAND() * 20), add key(b),
+ algorithm=copy, lock=none;
+--connection master
+delete from t where a = 20;
+update t set a = a + 1 where a = 10;
+--sync_slave_with_master
+select a from t;
+--connection master
+
+--echo # CURRENT_TIMESTAMP
+create or replace table t (a int);
+insert into t values (10),(20),(30);
+
+--sync_slave_with_master
+alter table t add b timestamp default CURRENT_TIMESTAMP, add key(b);
+--connection master
+delete from t where a = 20;
+update t set a = a + 1 where a = 10;
+--sync_slave_with_master
+select a from t;
+--connection master
+
+--echo # CURRENT_TIMESTAMP, mixed key
+create or replace table t (a int);
+insert into t values (10),(20),(30);
+
+--sync_slave_with_master
+alter table t add b timestamp default CURRENT_TIMESTAMP, add key(a, b);
+--connection master
+delete from t where a = 20;
+update t set a = a + 1 where a = 10;
+
+--sync_slave_with_master
+select a from t;
+--connection master
+
+--echo # Mixed primary key
+create or replace table t (a int);
+insert into t values (10),(20),(30);
+
+--sync_slave_with_master
+alter table t add b int default (1), add primary key(b, a);
+--connection master
+delete from t where a = 20;
+update t set a = a + 1 where a = 10;
+
+--sync_slave_with_master
+select a from t;
+--connection master
+
+--echo #
+--echo # Normal row, could be used as a key
+--echo #
+create or replace table t (a int);
+insert into t values (10),(20),(30);
+
+--sync_slave_with_master
+alter table t add b int as (a * 10) unique;
+--connection master
+delete from t where a = 20;
+update t set a = a + 1 where a = 10;
+
+--sync_slave_with_master
+select * from t;
+--connection master
+
+--echo #
+--echo # Add key for old row
+--echo #
+create or replace table t (a int);
+insert into t values (10),(20),(30);
+
+--sync_slave_with_master
+alter table t add unique(a);
+--connection master
+delete from t where a = 20;
+update t set a = a + 1 where a = 10;
+
+--sync_slave_with_master
+select * from t;
+
+--echo # Cleanup
+--connection master
+--sync_slave_with_master
+--connection master
+drop table t;
+
+--echo #
+--echo # MDEV-30985 Replica stops with error on ALTER ONLINE with Geometry Types
+--echo #
+create table t(geo geometrycollection default st_geomfromtext('point(1 1)'));
+insert into t () values (),(),();
+--sync_slave_with_master
+alter table t add vcol9 point as (geo), add key(vcol9);
+--connection master
+
+delete from t;
+--sync_slave_with_master
+--connection master
+
+drop table t;
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_alter_instant.test b/mysql-test/suite/rpl/t/rpl_alter_innodb.test
index 260f7e92..260f7e92 100644
--- a/mysql-test/suite/rpl/t/rpl_alter_instant.test
+++ b/mysql-test/suite/rpl/t/rpl_alter_innodb.test
diff --git a/mysql-test/suite/rpl/t/rpl_alter_online_debug.test b/mysql-test/suite/rpl/t/rpl_alter_online_debug.test
new file mode 100644
index 00000000..b257ce29
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_alter_online_debug.test
@@ -0,0 +1,128 @@
+source include/have_debug_sync.inc;
+source include/have_innodb.inc;
+source include/master-slave.inc;
+
+--connection master
+call mtr.add_suppression("Unsafe statement written to the binary log using statement format");
+
+--connection slave
+call mtr.add_suppression("Unsafe statement written to the binary log using statement format");
+
+#
+# Single-phase alter
+#
+
+--echo # MDEV-31804 Assertion `thd->m_transaction_psi == __null' fails upon
+--echo # replicating online ALTER
+--connection master
+create table t (a char(8)) engine=myisam;
+insert into t values ('foo'),('bar');
+
+set debug_sync= 'alter_table_online_progress signal go_dml wait_for go_alter';
+set @old_slave_exec_mode= @@global.slave_exec_mode;
+set @@global.slave_exec_mode= idempotent;
+send alter table t force;
+
+--connection master1
+set debug_sync= 'now wait_for go_dml';
+insert into t (a) values ('qux');
+set debug_sync= 'now signal go_alter';
+
+--connection master
+--reap
+--sync_slave_with_master
+
+# Cleanup
+--connection master
+drop table t;
+set global slave_exec_mode= @old_slave_exec_mode;
+set debug_sync= reset;
+
+
+--echo #
+--echo # End of 11.2 tests (Single-phase alter)
+--echo #
+
+
+#
+# Two-phase alter
+#
+--connection slave
+source include/stop_slave.inc;
+--let $slave_parallel_threads=`select @@global.slave_parallel_threads`
+--let $slave_parallel_mode= `select @@global.slave_parallel_mode`
+--let $binlog_row_image= `select @@global.binlog_row_image`
+set global slave_parallel_threads=3;
+set global slave_parallel_mode= optimistic;
+set global binlog_row_image=MINIMAL;
+--connection master
+
+
+--echo #
+--echo # MDEV-31755 Replica's DML event deadlocks wit online alter table
+--echo #
+--echo # Three threads for SA,U,CA
+
+create table t (id int, a int, primary key (id)) engine=innodb;
+insert into t values (1,10), (2,20);
+
+set @@session.binlog_alter_two_phase=1;
+set debug_sync= 'alter_table_online_downgraded signal ready wait_for go';
+send alter table t add c text default('qqq') after id, algorithm=copy, lock=none;
+
+--connection master1
+set debug_sync= 'now wait_for ready';
+
+update t set a = 1;
+
+set debug_sync= 'now signal go';
+
+--connection master
+--reap
+--source include/save_master_gtid.inc
+
+--connection slave
+source include/start_slave.inc;
+--source include/sync_with_master_gtid.inc
+select * from t;
+
+# Cleanup
+--connection master
+drop table t;
+
+--echo # MDEV-31838 Assertion fails on replica upon parallel
+--echo # replication with two-phase alter and MINIMAL row image
+create table t (id int, a int, primary key(id)) engine=aria;
+insert into t values (1,0);
+
+set @@session.binlog_alter_two_phase=1;
+set debug_sync= 'alter_table_online_progress signal go_dml wait_for go_alter';
+send alter table t force, algorithm=copy, lock=none;
+
+--connection master1
+set binlog_row_image=MINIMAL;
+set debug_sync= 'now wait_for go_dml';
+--disable_warnings
+update ignore t set a = 1;
+--enable_warnings
+set debug_sync= 'now signal go_alter';
+
+# Cleanup
+--connection master
+--reap
+drop table t;
+--sync_slave_with_master
+--connection master
+
+--echo #
+--echo # End of 11.2 tests (Two-phase alter)
+--echo #
+
+--connection slave
+source include/stop_slave.inc;
+--eval set global binlog_row_image=$binlog_row_image
+--eval set global slave_parallel_threads=$slave_parallel_threads
+--eval set global slave_parallel_mode= $slave_parallel_mode
+source include/start_slave.inc;
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_bug26395.test b/mysql-test/suite/rpl/t/rpl_bug26395.test
index 0c1b2a7a..5054b106 100644
--- a/mysql-test/suite/rpl/t/rpl_bug26395.test
+++ b/mysql-test/suite/rpl/t/rpl_bug26395.test
@@ -30,7 +30,7 @@
# BUG#26395: if crash during autocommit update to transactional table on master, slave fails
source include/have_innodb.inc;
-# have_debug is needed since we use the @@debug variable on master
+# have_debug is needed since we use the @@debug_dbug variable on master
source include/have_debug.inc;
source include/master-slave.inc;
@@ -43,7 +43,7 @@ CREATE TABLE tinnodb (a INT) ENGINE = INNODB;
SHOW CREATE TABLE tinnodb;
# do_not_write_xid stops the master from writing an XID event.
-set @old_debug= @@debug;
+set @old_debug= @@debug_dbug;
set @@debug_dbug= 'd,do_not_write_xid';
diff --git a/mysql-test/suite/rpl/t/rpl_checksum_cache.test b/mysql-test/suite/rpl/t/rpl_checksum_cache.test
index e04f618b..173af8c1 100644
--- a/mysql-test/suite/rpl/t/rpl_checksum_cache.test
+++ b/mysql-test/suite/rpl/t/rpl_checksum_cache.test
@@ -243,6 +243,102 @@ let $diff_tables=master:test.t3, slave:test.t3;
source include/diff_tables.inc;
+--echo *** Test switching checksum algorithm while ongoing transactions have pre-computed checksum in their binlog cache ***
+
+--connection master
+CREATE TABLE t4 (a INT, b INT, c VARCHAR(1024), PRIMARY KEY (a,b)) ENGINE=InnoDB;
+
+# Create a couple transactions that will precompute checksums but commit
+# without them.
+
+BEGIN;
+INSERT INTO t4 VALUES (1, 1, "small, pre-computed checksums");
+
+--connection server_1
+BEGIN;
+INSERT INTO t4 VALUES (2, 1, "big, pre-computed checksums");
+--let $i= 20
+--disable_query_log
+while ($i) {
+ eval INSERT INTO t4 VALUES (2, 22-$i, REPEAT("x", FLOOR(RAND()*100) + 831));
+ dec $i;
+}
+--enable_query_log
+
+# Disable checksums dynamically, so MYSQL_BIN_LOG::write_cache() will have
+# to drop the pre-computed checksums.
+set @@global.binlog_checksum = NONE;
+
+--connection master
+INSERT INTO t4 VALUES (1, 2, "done");
+COMMIT;
+--connection server_1
+INSERT INTO t4 VALUES (2, 22, "done");
+COMMIT;
+
+# Create a couple transactions that will not precompute checksums but commit
+# with them.
+
+--connection master
+BEGIN;
+INSERT INTO t4 VALUES (3, 1, "small, no pre-computed checksums");
+
+--connection server_1
+BEGIN;
+INSERT INTO t4 VALUES (4, 1, "big, no pre-computed checksums");
+--let $i= 20
+--disable_query_log
+while ($i) {
+ eval INSERT INTO t4 VALUES (4, 22-$i, REPEAT("x", FLOOR(RAND()*100) + 853));
+ dec $i;
+}
+--enable_query_log
+
+# Ebable checksums dynamically, so MYSQL_BIN_LOG::write_cache() will have
+# to recompute the checksums.
+set @@global.binlog_checksum = CRC32;
+
+--connection master
+INSERT INTO t4 VALUES (3, 2, "done");
+COMMIT;
+--connection server_1
+INSERT INTO t4 VALUES (4, 22, "done");
+COMMIT;
+
+sync_slave_with_master;
+
+
+--echo *** Test the --binlog-legacy-event-pos option.
+--connection master
+FLUSH BINARY LOGS;
+--source include/wait_for_binlog_checkpoint.inc
+
+--let $query_file= query_get_value(SHOW MASTER STATUS, File, 1)
+--let $query_pos= query_get_value(SHOW MASTER STATUS, Position, 1)
+BEGIN;
+INSERT INTO t4 VALUES (5, 1, "Zero end_log_pos");
+COMMIT;
+--let $end_log_pos= query_get_value(SHOW BINLOG EVENTS IN "$query_file" FROM $query_pos LIMIT 3, End_log_pos, 2)
+if ($end_log_pos!=0) {
+ eval SHOW BINLOG EVENTS IN "$query_file";
+ --die Wrong End_log_pos=$end_log_pos, expected zero.
+}
+
+set @@global.binlog_legacy_event_pos= 1;
+--let $query_pos= query_get_value(SHOW MASTER STATUS, Position, 1)
+BEGIN;
+INSERT INTO t4 VALUES (6, 1, "Non-zero end_log_pos");
+COMMIT;
+--let $end_log_pos= query_get_value(SHOW BINLOG EVENTS IN "$query_file" FROM $query_pos LIMIT 3, End_log_pos, 2)
+if ($end_log_pos==0) {
+ eval SHOW BINLOG EVENTS IN "$query_file";
+ --die Wrong End_log_pos=$end_log_pos, expected non-zero.
+}
+set @@global.binlog_legacy_event_pos= 0;
+
+sync_slave_with_master;
+
+
connection master;
begin;
@@ -251,7 +347,7 @@ delete from t2;
delete from t3;
commit;
-drop table t1, t2, t3;
+drop table t1, t2, t3, t4;
set @@global.binlog_cache_size = @save_binlog_cache_size;
set @@global.binlog_checksum = @save_binlog_checksum;
set @@global.master_verify_checksum = @save_master_verify_checksum;
diff --git a/mysql-test/suite/rpl/t/rpl_circular_semi_sync.test b/mysql-test/suite/rpl/t/rpl_circular_semi_sync.test
index e533c54b..75d04d65 100644
--- a/mysql-test/suite/rpl/t/rpl_circular_semi_sync.test
+++ b/mysql-test/suite/rpl/t/rpl_circular_semi_sync.test
@@ -55,7 +55,7 @@ INSERT INTO t1(a) VALUES (1);
set @@global.gtid_strict_mode = true;
set @@global.rpl_semi_sync_slave_enabled = 1;
-evalp CHANGE MASTER TO master_host='127.0.0.1', master_port=$SERVER_MYPORT_2, master_user='root', master_use_gtid=SLAVE_POS;
+evalp CHANGE MASTER TO master_host='127.0.0.1', master_port=$SERVER_MYPORT_2, master_user='root', master_ssl_verify_server_cert=0, master_use_gtid=SLAVE_POS;
--source include/start_slave.inc
--echo ... is done.
diff --git a/mysql-test/suite/rpl/t/rpl_connection.test b/mysql-test/suite/rpl/t/rpl_connection.test
index 24ada7c8..5ad076de 100644
--- a/mysql-test/suite/rpl/t/rpl_connection.test
+++ b/mysql-test/suite/rpl/t/rpl_connection.test
@@ -19,6 +19,6 @@ START SLAVE;
--source include/stop_slave_sql.inc
CHANGE MASTER TO MASTER_USER= 'root', MASTER_PASSWORD= '';
-START SLAVE;
+--source include/start_slave.inc
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_corruption.test b/mysql-test/suite/rpl/t/rpl_corruption.test
index cd2a1cc7..16270fa4 100644
--- a/mysql-test/suite/rpl/t/rpl_corruption.test
+++ b/mysql-test/suite/rpl/t/rpl_corruption.test
@@ -14,10 +14,10 @@
############################################################
#
-# The tests intensively utilize @@global.debug. Note,
+# The tests intensively utilize @@global.debug_dbug. Note,
# Bug#11765758 - 58754,
-# @@global.debug is read by the slave threads through dbug-interface.
-# Hence, before a client thread set @@global.debug we have to ensure that:
+# @@global.debug_dbug is read by the slave threads through dbug-interface.
+# Hence, before a client thread set @@global.debug_dbug we have to ensure that:
# (a) the slave threads are stopped, or (b) the slave threads are in
# sync and waiting.
diff --git a/mysql-test/suite/rpl/t/rpl_cross_version-master.opt b/mysql-test/suite/rpl/t/rpl_cross_version-master.opt
deleted file mode 100644
index 815a8f81..00000000
--- a/mysql-test/suite/rpl/t/rpl_cross_version-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---replicate-same-server-id --relay-log=slave-relay-bin
diff --git a/mysql-test/suite/rpl/t/rpl_cross_version.test b/mysql-test/suite/rpl/t/rpl_cross_version.test
deleted file mode 100644
index 94c9f043..00000000
--- a/mysql-test/suite/rpl/t/rpl_cross_version.test
+++ /dev/null
@@ -1,48 +0,0 @@
-# ==== Purpose ====
-#
-# Verify cross-version replication from an old master to the up-to-date slave
-#
-# ==== Implementation ====
-#
-# Feed to the slave server a binlog recorded on an old version master
-# via setting up slave-to-slave replication. The latter is done by means of
-# the opt file and include/setup_fake_relay_log.inc.
-# The master's binlog is treated as a relay log that the SQL thread executes.
-#
-
---source include/master-slave.inc
-
-#
-# Bug#31240 load data infile replication between (4.0 or 4.1) and 5.1 fails
-#
-
---echo ==== Initialize ====
---connection slave
-
---disable_query_log
-# The binlog contains the function RAND which is unsafe.
-CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
---enable_query_log
-
---source include/stop_slave.inc
-RESET SLAVE;
-
-# the relay log contains create t1, t3 tables and load data infile
---let $fake_relay_log = $MYSQL_TEST_DIR/suite/binlog/std_data/binlog_old_version_4_1.000001
---source include/setup_fake_relay_log.inc
-
---echo ==== Test ====
-start slave sql_thread;
---let $slave_param = Exec_Master_Log_Pos
-# end_log_pos of the last event of the relay log
---let $slave_param_value = 149436
---source include/wait_for_slave_param.inc
---echo ==== a prove that the fake has been processed successfully ====
-SELECT COUNT(*) - 17920 as zero FROM t3;
-
---echo ==== Clean up ====
---source include/stop_slave_sql.inc
---source include/cleanup_fake_relay_log.inc
-drop table t1, t3;
---let $rpl_only_running_threads= 1
---source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_ctype_collate_implicit.test b/mysql-test/suite/rpl/t/rpl_ctype_collate_implicit.test
new file mode 100644
index 00000000..ba4e3fed
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_ctype_collate_implicit.test
@@ -0,0 +1,60 @@
+--source include/have_binlog_format_row.inc
+--source include/master-slave.inc
+
+--echo #
+--echo # MDEV-30164 System variable for default collations
+--echo #
+
+--connection master
+SET @@character_set_collations='utf8mb3=uca1400_ai_ci,'
+ 'utf8mb4=uca1400_ai_ci,'
+ 'ucs2=uca1400_ai_ci,'
+ 'utf16=uca1400_ai_ci,'
+ 'utf32=uca1400_ai_ci';
+
+--connection master
+CREATE TABLE t1 AS SELECT CHAR(0x61 USING utf8mb4);
+SHOW CREATE TABLE t1;
+--sync_slave_with_master
+SHOW CREATE TABLE t1;
+--connection master
+DROP TABLE t1;
+--sync_slave_with_master
+
+
+--connection master
+CREATE TABLE t1 AS SELECT CONVERT('a' USING utf8mb4);
+SHOW CREATE TABLE t1;
+--sync_slave_with_master
+SHOW CREATE TABLE t1;
+--connection master
+DROP TABLE t1;
+--sync_slave_with_master
+
+
+--connection master
+CREATE TABLE t1 (
+ c0 TEXT CHARACTER SET utf8mb3,
+ c1 TEXT CHARACTER SET utf8mb4,
+ c2 TEXT CHARACTER SET utf16,
+ c3 TEXT CHARACTER SET utf32,
+ c4 TEXT CHARACTER SET ucs2
+);
+SHOW CREATE TABLE t1;
+--sync_slave_with_master
+SHOW CREATE TABLE t1;
+--connection master
+DROP TABLE t1;
+--sync_slave_with_master
+
+
+--connection master
+CREATE DATABASE db1 CHARACTER SET utf8mb4;
+--sync_slave_with_master
+SHOW CREATE DATABASE db1;
+--connection master
+DROP DATABASE db1;
+--sync_slave_with_master
+
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_extra_col_slave_minimal.test b/mysql-test/suite/rpl/t/rpl_extra_col_slave_minimal.test
new file mode 100644
index 00000000..7e2daa9a
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_extra_col_slave_minimal.test
@@ -0,0 +1,44 @@
+--source include/have_binlog_format_row.inc
+--source include/have_innodb.inc
+--source include/master-slave.inc
+
+set binlog_row_image=minimal;
+
+connection slave;
+stop slave;
+set global binlog_row_image=minimal;
+--source include/reset_slave.inc
+
+create table t1 (
+ a int key, b blob, c char(5),
+ d char(10) as (concat(trim(c), '-U')) unique,
+ e char(10) as (concat('S', b)) stored) engine=innodb;
+
+connection master;
+create table t1 (a int primary key, b blob, c char(5)) engine=innodb;
+reset master;
+
+connection slave;
+start slave;
+
+connection master;
+set timestamp=unix_timestamp('2010-10-10 10:10:10');
+insert t1 values (1,'.','Kyle'),(2,'?','JOE'),(3,'!','QA'), (4, '$', '4TH');
+update t1 set c='UPD' where a=3;
+update t1 set b='#' where a=2;
+delete from t1 where a=4;
+--sorted_result
+select * from t1;
+--sorted_result
+sync_slave_with_master;
+--sorted_result
+select * from t1;
+select d from t1; # no --sorted_result here, this must be KEYREAD, so must be sorted
+select * from t1 where d='JOE-U';
+
+connection master;
+drop table t1;
+sync_slave_with_master;
+set global binlog_row_image=full;
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_geometry.test b/mysql-test/suite/rpl/t/rpl_geometry.test
index 415732a0..664979eb 100644
--- a/mysql-test/suite/rpl/t/rpl_geometry.test
+++ b/mysql-test/suite/rpl/t/rpl_geometry.test
@@ -23,4 +23,17 @@ sync_slave_with_master;
connection master;
drop table t1, t2;
+
+--echo #
+--echo # MDEV-30985 Replica stops with error on ALTER ONLINE with Geometry Types
+--echo #
+create table t(geo geometrycollection default st_geomfromtext('point(1 1)'),
+ vc point as (geo));
+insert into t () values (),(),();
+delete from t;
+
+sync_slave_with_master;
+connection master;
+drop table t;
+
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_gtid_glle_no_terminate.test b/mysql-test/suite/rpl/t/rpl_gtid_glle_no_terminate.test
index f0f38a31..8d8f22bb 100644
--- a/mysql-test/suite/rpl/t/rpl_gtid_glle_no_terminate.test
+++ b/mysql-test/suite/rpl/t/rpl_gtid_glle_no_terminate.test
@@ -24,6 +24,7 @@ CHANGE MASTER TO MASTER_USE_GTID=slave_pos;
--echo #
--echo # Initialize test data
--connection master
+--source include/wait_for_binlog_checkpoint.inc
create table t1 (a int);
SET @@session.server_id= 3;
create table t2 (a int);
diff --git a/mysql-test/suite/rpl/t/rpl_gtid_index.test b/mysql-test/suite/rpl/t/rpl_gtid_index.test
new file mode 100644
index 00000000..6001cc6e
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_gtid_index.test
@@ -0,0 +1,89 @@
+--source include/have_sequence.inc
+--source include/have_innodb.inc
+--source include/master-slave.inc
+--source include/have_binlog_format_mixed.inc
+
+--connection slave
+--source include/stop_slave.inc
+CHANGE MASTER TO master_use_gtid= slave_pos;
+--source include/start_slave.inc
+
+--connection master
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (0, 0);
+
+
+--echo *** Test looking up a lot of different event positions and GTIDs.
+
+# A function for comparing GTID positions.
+# Handles that the domain_id order is different in the two strings.
+# Works by repeatedly removing one GTID from each string. If the strings have
+# the same length and nothing is left at the end, then they are identical.
+delimiter //;
+CREATE FUNCTION gtid_eq(a VARCHAR(255), b VARCHAR(255)) RETURNS BOOLEAN DETERMINISTIC
+BEGIN
+ DECLARE g VARCHAR(255);
+ IF a IS NULL OR b IS NULL OR LENGTH(a) != LENGTH(b) THEN
+ RETURN FALSE;
+ END IF;
+ SET a= CONCAT(a, ',');
+ SET b= CONCAT(',', b, ',');
+ WHILE LENGTH(a) > 0 DO
+ SET g= REGEXP_SUBSTR(a, '^[^,]+,');
+ SET a= SUBSTRING(a, LENGTH(g)+1);
+ SET b= REPLACE(b, CONCAT(',', g), ',');
+ END WHILE;
+ RETURN b = ',';
+END //
+delimiter ;//
+
+SET @old_page_size= @@GLOBAL.binlog_gtid_index_page_size;
+SET @old_span_min= @@GLOBAL.binlog_gtid_index_span_min;
+
+--echo *** A fair amount of work with default GTID index settings.
+--let $NUM_POS= 200
+--let $NUM_DOMAIN= 5
+--let $NUM_SERVER= 5
+--let $NUM_SLAVE_CONNECTS= 50
+--let $RND_SEED= 42
+--source suite/rpl/include/rpl_gtid_index.inc
+
+--echo *** A lot of GTIDs with small btree pages to stress the Btree code.
+--let $NUM_POS= 1000
+--let $NUM_DOMAIN= 10
+--let $RND_SEED= 150
+SET GLOBAL binlog_gtid_index_page_size= 64;
+SET GLOBAL binlog_gtid_index_span_min= 1;
+--source suite/rpl/include/rpl_gtid_index.inc
+
+--echo *** Small page size with sparse index.
+--let $NUM_POS= 200
+--let $RND_SEED= 666
+SET GLOBAL binlog_gtid_index_page_size= 64;
+SET GLOBAL binlog_gtid_index_span_min= 2048;
+--source suite/rpl/include/rpl_gtid_index.inc
+
+--echo *** Medium page size.
+--let $NUM_POS= 200
+--let $RND_SEED= 1024
+SET GLOBAL binlog_gtid_index_page_size= 512;
+SET GLOBAL binlog_gtid_index_span_min= 512;
+--source suite/rpl/include/rpl_gtid_index.inc
+
+--echo *** Large page size.
+--let $NUM_POS= 200
+--let $RND_SEED= 12345
+SET GLOBAL binlog_gtid_index_page_size= 16384;
+SET GLOBAL binlog_gtid_index_span_min= 1;
+--source suite/rpl/include/rpl_gtid_index.inc
+
+
+# Cleanup.
+--connection master
+SET GLOBAL binlog_gtid_index_page_size= @old_page_size;
+SET GLOBAL binlog_gtid_index_span_min= @old_span_min;
+
+DROP TABLE t1;
+DROP FUNCTION gtid_eq;
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_gtid_master_promote.test b/mysql-test/suite/rpl/t/rpl_gtid_master_promote.test
index 064c70b1..5e2470ed 100644
--- a/mysql-test/suite/rpl/t/rpl_gtid_master_promote.test
+++ b/mysql-test/suite/rpl/t/rpl_gtid_master_promote.test
@@ -221,7 +221,8 @@ SELECT * FROM t4 ORDER BY a,b;
--connection server_1
--replace_result $SERVER_MYPORT_2 SERVER_MYPORT_2
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $SERVER_MYPORT_2,
- master_user = "root", master_use_gtid = slave_pos, master_demote_to_slave=1;
+ master_user = "root", master_ssl_verify_server_cert=0,
+ master_use_gtid = slave_pos, master_demote_to_slave=1;
--source include/start_slave.inc
--sync_with_master
SELECT * FROM t1 ORDER BY a;
diff --git a/mysql-test/suite/rpl/t/rpl_gtid_mdev4473.test b/mysql-test/suite/rpl/t/rpl_gtid_mdev4473.test
index f52e51c2..396ea5de 100644
--- a/mysql-test/suite/rpl/t/rpl_gtid_mdev4473.test
+++ b/mysql-test/suite/rpl/t/rpl_gtid_mdev4473.test
@@ -24,7 +24,8 @@ reset slave all;
connection server_1;
--replace_result $SERVER_MYPORT_2 SERVER_MYPORT_2
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $SERVER_MYPORT_2,
- master_user='root', MASTER_USE_GTID=SLAVE_POS, master_demote_to_slave=1;
+ master_user='root', master_ssl_verify_server_cert=0,
+ MASTER_USE_GTID=SLAVE_POS, master_demote_to_slave=1;
source include/start_slave.inc;
source include/wait_for_slave_to_start.inc;
diff --git a/mysql-test/suite/rpl/t/rpl_gtid_mdev4485.test b/mysql-test/suite/rpl/t/rpl_gtid_mdev4485.test
index 6c37ceaf..7ee811ba 100644
--- a/mysql-test/suite/rpl/t/rpl_gtid_mdev4485.test
+++ b/mysql-test/suite/rpl/t/rpl_gtid_mdev4485.test
@@ -13,7 +13,7 @@ create table t2 (i int);
set default_master_connection = 'm2';
--replace_result $SERVER_MYPORT_2 SERVER_MYPORT_2
-eval change master to master_host='127.0.0.1', master_port=$SERVER_MYPORT_2, master_user='root', master_use_gtid=slave_pos;
+eval change master to master_host='127.0.0.1', master_port=$SERVER_MYPORT_2, master_user='root', master_ssl_verify_server_cert=0, master_use_gtid=slave_pos;
--source include/start_slave.inc
--connection server_2
diff --git a/mysql-test/suite/rpl/t/rpl_gtid_mdev4820.test b/mysql-test/suite/rpl/t/rpl_gtid_mdev4820.test
index 7f4d851f..79b3b7d4 100644
--- a/mysql-test/suite/rpl/t/rpl_gtid_mdev4820.test
+++ b/mysql-test/suite/rpl/t/rpl_gtid_mdev4820.test
@@ -59,7 +59,7 @@ SET GLOBAL gtid_slave_pos= '0-2-10';
--connection server_1
--replace_result $SERVER_MYPORT_2 SERVER_MYPORT_2
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $SERVER_MYPORT_2,
- master_user= 'root', master_use_gtid=CURRENT_POS;
+ master_user= 'root', master_ssl_verify_server_cert=0, master_use_gtid=CURRENT_POS;
START SLAVE;
--connection server_2
diff --git a/mysql-test/suite/rpl/t/rpl_gtid_nobinlog.test b/mysql-test/suite/rpl/t/rpl_gtid_nobinlog.test
index e140f335..48627a6d 100644
--- a/mysql-test/suite/rpl/t/rpl_gtid_nobinlog.test
+++ b/mysql-test/suite/rpl/t/rpl_gtid_nobinlog.test
@@ -24,8 +24,8 @@ SELECT * FROM t1 ORDER BY a;
--connection server_1
--replace_result $SLAVE_MYPORT SLAVE_PORT
-eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $SLAVE_MYPORT,
- master_user = 'root';
+eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $SLAVE_MYPORT, master_ssl_verify_server_cert=0,
+ master_user = 'root', master_ssl_verify_server_cert=0;
START SLAVE;
--source include/wait_for_slave_to_start.inc
@@ -49,7 +49,7 @@ INSERT INTO t1 VALUES (6, 1);
--connection server_2
--replace_result $MASTER_MYPORT MASTER_PORT
-eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $MASTER_MYPORT;
+eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $MASTER_MYPORT, master_ssl_verify_server_cert=0;
START SLAVE;
--source include/sync_with_master_gtid.inc
diff --git a/mysql-test/suite/rpl/t/rpl_gtid_until_before_after_gtids.test b/mysql-test/suite/rpl/t/rpl_gtid_until_before_after_gtids.test
new file mode 100644
index 00000000..cf245ca0
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_gtid_until_before_after_gtids.test
@@ -0,0 +1,45 @@
+#
+# This test validates the behavior of SQL_BEFORE_GTIDS and SQL_AFTER_GTIDS
+# of a slave's START SLAVE UNTIL command. Notably, it tests the following
+# scenarios:
+# 1. Single domain id in binary log with a single domain id in the UNTIL
+# condition
+# 2. Multiple domain ids in binary log with a single domain id in the UNTIL
+# condition
+# 3. Multiple domain ids in binary log with multiple domain ids in the UNTIL
+# condition
+# 4. A gap in the binary log with the UNTIL condition GTID pointed to the
+# missing transaction
+# 5. Syntax errors using the new options
+#
+#
+# References:
+# MDEV-27247: Add keywords "exclusive" and "inclusive" for START SLAVE UNTIL
+#
+
+--source include/have_innodb.inc
+--source include/have_log_bin.inc
+--source include/master-slave.inc
+
+--let $ssu_before_gtids=1
+--source include/rpl_gtid_until_before_after_gtids.test
+
+--let $ssu_before_gtids=0
+--source include/rpl_gtid_until_before_after_gtids.test
+
+--echo #
+--echo # Error Case 2: Providing both SQL_BEFORE_GTIDS and SQL_AFTER_GTIDS
+--echo # should result in a syntax error
+--connection slave
+--error ER_PARSE_ERROR
+START SLAVE UNTIL SQL_AFTER_GTIDS="0-1-1" SQL_BEFORE_GTIDS="0-1-1";
+
+--echo #
+--echo # Cleanup
+--source include/save_master_gtid.inc
+
+--connection slave
+--source include/sync_with_master_gtid.inc
+
+--source include/rpl_end.inc
+--echo # End of rpl_gtid_until_before_gtids.test
diff --git a/mysql-test/suite/rpl/t/rpl_heartbeat.test b/mysql-test/suite/rpl/t/rpl_heartbeat.test
index 8a852fd3..a34cf761 100644
--- a/mysql-test/suite/rpl/t/rpl_heartbeat.test
+++ b/mysql-test/suite/rpl/t/rpl_heartbeat.test
@@ -106,7 +106,7 @@ connection slave;
set @@global.slave_net_timeout= 10;
--replace_result $MASTER_MYPORT MASTER_PORT
# no error this time but rather a warning
-eval change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT, master_user='root', master_heartbeat_period= 0.5;
+eval change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT, master_user='root', master_ssl_verify_server_cert=0, master_heartbeat_period= 0.5;
--query_vertical show status like 'Slave_heartbeat_period';
start slave;
diff --git a/mysql-test/suite/rpl/t/rpl_heartbeat_ssl.test b/mysql-test/suite/rpl/t/rpl_heartbeat_ssl.test
index 2c41fdee..156294ee 100644
--- a/mysql-test/suite/rpl/t/rpl_heartbeat_ssl.test
+++ b/mysql-test/suite/rpl/t/rpl_heartbeat_ssl.test
@@ -49,7 +49,7 @@ let $status_var_comparsion= >;
--echo *** Clean up ***
--source include/stop_slave.inc
CHANGE MASTER TO
- MASTER_SSL=0,
+ MASTER_SSL=1,
MASTER_SSL_CA='',
MASTER_SSL_CERT='',
MASTER_SSL_KEY='';
diff --git a/mysql-test/suite/rpl/t/rpl_invoked_features.test b/mysql-test/suite/rpl/t/rpl_invoked_features.test
index cd2b770c..0467a243 100644
--- a/mysql-test/suite/rpl/t/rpl_invoked_features.test
+++ b/mysql-test/suite/rpl/t/rpl_invoked_features.test
@@ -8,9 +8,8 @@
--source include/have_innodb.inc
--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");
-enable_query_log;
+call mtr.add_suppression("Event Scheduler: .* Duplicate entry '10' for key 'a'");
# --disable_warnings/--enable_warnings added before/after query
# if one uses UUID() function because we need to avoid warnings
@@ -22,60 +21,35 @@ enable_query_log;
# Transactional engine
--let $engine_type2= innodb
-
-#
-# Clean up
-#
-
-USE test;
---disable_warnings
-DROP VIEW IF EXISTS v1,v11;
-DROP TABLE IF EXISTS t1,t2,t3,t11,t12,t13;
-DROP PROCEDURE IF EXISTS p1;
-DROP PROCEDURE IF EXISTS p11;
-DROP FUNCTION IF EXISTS f1;
-DROP FUNCTION IF EXISTS f2;
-DROP EVENT IF EXISTS e1;
-DROP EVENT IF EXISTS e11;
---enable_warnings
-
-
#
# Prepare objects (tables etc)
#
-# Create tables
+--echo # Create tables
---echo
eval CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b INT, c VARCHAR(64)) ENGINE=$engine_type;
INSERT INTO t1 VALUES (1,1,'1');
---disable_warnings
+--disable_warnings ONCE
INSERT INTO t1 VALUES (2,2,UUID());
---enable_warnings
eval CREATE TABLE t2 (a INT UNIQUE, b INT, c VARCHAR(64)) ENGINE=$engine_type;
INSERT INTO t2 VALUES (1,1,'1');
---disable_warnings
+--disable_warnings ONCE
INSERT INTO t2 VALUES (2,2,UUID());
---enable_warnings
eval CREATE TABLE t11 (a INT NOT NULL PRIMARY KEY, b INT, c VARCHAR(64)) ENGINE=$engine_type2;
INSERT INTO t11 VALUES (1,1,'1');
---disable_warnings
+--disable_warnings ONCE
INSERT INTO t11 VALUES (2,2,UUID());
---enable_warnings
eval CREATE TABLE t12 (a INT UNIQUE, b INT, c VARCHAR(64)) ENGINE=$engine_type2;
INSERT INTO t12 VALUES (1,1,'1');
---disable_warnings
+--disable_warnings ONCE
INSERT INTO t12 VALUES (2,2,UUID());
---enable_warnings
-# Create invoked features
---echo
-# Create view for tables t1,t11
+--echo # Create invoked features
+
CREATE VIEW v1 AS SELECT * FROM t1;
CREATE VIEW v11 AS SELECT * FROM t11;
-# Create triggers for t1,t11
DELIMITER |;
CREATE TRIGGER t1_tr1 BEFORE INSERT ON t1 FOR EACH ROW
@@ -102,11 +76,7 @@ BEGIN
UPDATE t13 SET c = '';
END|
-# Create events which will run every 10 sec
-# It cannot be much shorter as we have to ensure that a new
-# event is not scheduled before the DISABLE has been
-# executed.
-CREATE EVENT e1 ON SCHEDULE EVERY 10 SECOND DISABLE DO
+CREATE EVENT e1 ON SCHEDULE EVERY 1 SECOND DISABLE DO
BEGIN
ALTER EVENT e1 DISABLE;
CALL p1(10, '');
@@ -118,7 +88,6 @@ BEGIN
CALL p11(10, '');
END|
-# Create functions and procedures used for events
CREATE FUNCTION f1 (x INT) RETURNS VARCHAR(64)
BEGIN
IF x > 5 THEN
@@ -149,46 +118,39 @@ DELIMITER ;|
# Start test case
#
-# Do some actions for non-transactional tables
---echo
+--echo # Do some actions for non-transactional tables
CREATE TABLE t3 SELECT * FROM v1;
INSERT INTO t1 VALUES (3,3,'');
UPDATE t1 SET c='2' WHERE a = 1;
---disable_warnings
+--disable_warnings ONCE
INSERT INTO t1 VALUES(4,4,f1(4));
---enable_warnings
INSERT INTO t1 VALUES (100,100,'');
---disable_warnings
CALL p1(5, UUID());
---enable_warnings
INSERT INTO t1 VALUES (101,101,'');
---disable_warnings
+--disable_warnings ONCE
INSERT INTO t1 VALUES(6,6,f1(6));
---enable_warnings
INSERT INTO t1 VALUES (102,102,'');
---disable_warnings
+--disable_warnings ONCE
INSERT INTO t1 VALUES(7,7,f2(7));
---enable_warnings
INSERT INTO t1 VALUES (103,103,'');
-# Do some actions for transactional tables
---echo
---disable_warnings
+--echo # Do some actions for transactional tables
CREATE TABLE t13 SELECT * FROM v11;
INSERT INTO t11 VALUES (3,3,'');
UPDATE t11 SET c='2' WHERE a = 1;
+--disable_warnings ONCE
INSERT INTO t11 VALUES(4,4,f1(4));
INSERT INTO t11 VALUES (100,100,'');
CALL p11(5, UUID());
INSERT INTO t11 VALUES (101,101,'');
+--disable_warnings ONCE
INSERT INTO t11 VALUES(6,6,f1(6));
INSERT INTO t11 VALUES (102,102,'');
+--disable_warnings ONCE
INSERT INTO t11 VALUES(7,7,f2(7));
INSERT INTO t11 VALUES (103,103,'');
---enable_warnings
-# Scheduler is on
---echo
+--echo # Scheduler is on
# Temporally events fire sequentally due Bug#29020.
SET GLOBAL EVENT_SCHEDULER = on;
# Wait while events will executed
@@ -200,8 +162,7 @@ let $wait_condition= SELECT COUNT(*) = 1 FROM t11 WHERE t11.a = 10;
--source include/wait_condition.inc
SET GLOBAL EVENT_SCHEDULER = off;
-# Check original objects
---echo
+--echo # Check original objects
--sorted_result
SHOW TABLES LIKE 't%';
--sorted_result
@@ -232,8 +193,7 @@ SELECT a,b FROM v11 ORDER BY a;
--sync_slave_with_master slave
-# Check replicated objects
---echo
+--echo # Check replicated objects
--sorted_result
SHOW TABLES LIKE 't%';
--sorted_result
@@ -245,8 +205,7 @@ SELECT routine_type, routine_name FROM information_schema.routines WHERE routine
--sorted_result
SELECT event_name, status FROM information_schema.events WHERE event_schema='test';
-# Check replicated data
---echo
+--echo # Check replicated data
SELECT COUNT(*) FROM t1;
SELECT a,b FROM t1 ORDER BY a;
SELECT COUNT(*) FROM t2;
@@ -262,10 +221,8 @@ SELECT COUNT(*) FROM t13;
SELECT a,b FROM t13 ORDER BY a;
SELECT a,b FROM v11 ORDER BY a;
-# Remove UUID() before comparing and sort tables
-
--connection master
---echo
+--echo # Remove UUID() before comparing and sort tables
UPDATE t1 SET c='';
UPDATE t2 SET c='';
UPDATE t3 SET c='';
@@ -280,25 +237,19 @@ ALTER TABLE t13 ORDER BY a;
--sync_slave_with_master slave
-# Compare a data from master and slave
---echo
+--echo # Compare a data from master and slave
--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_invoked_features_master.sql
--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_invoked_features_slave.sql
--diff_files $MYSQLTEST_VARDIR/tmp/rpl_invoked_features_master.sql $MYSQLTEST_VARDIR/tmp/rpl_invoked_features_slave.sql
-
#
# Clean up
#
-# Remove dumps
---echo
--remove_file $MYSQLTEST_VARDIR/tmp/rpl_invoked_features_master.sql
--remove_file $MYSQLTEST_VARDIR/tmp/rpl_invoked_features_slave.sql
-# Remove tables,views,procedures,functions
--connection master
---echo
DROP VIEW IF EXISTS v1,v11;
DROP TABLE IF EXISTS t1,t2,t3,t11,t12,t13;
DROP PROCEDURE IF EXISTS p1;
diff --git a/mysql-test/suite/rpl/t/rpl_ip_mix.cnf b/mysql-test/suite/rpl/t/rpl_ip_mix.cnf
index 00e2637d..195bc57c 100644
--- a/mysql-test/suite/rpl/t/rpl_ip_mix.cnf
+++ b/mysql-test/suite/rpl/t/rpl_ip_mix.cnf
@@ -1,6 +1,5 @@
# Use default setting for mysqld processes
-!include include/default_mysqld.cnf
-!include include/default_client.cnf
+!include include/default_my.cnf
[mysqld.1]
diff --git a/mysql-test/suite/rpl/t/rpl_ip_mix2.cnf b/mysql-test/suite/rpl/t/rpl_ip_mix2.cnf
index 306df437..5a247cbe 100644
--- a/mysql-test/suite/rpl/t/rpl_ip_mix2.cnf
+++ b/mysql-test/suite/rpl/t/rpl_ip_mix2.cnf
@@ -1,6 +1,5 @@
# Use default setting for mysqld processes
-!include include/default_mysqld.cnf
-!include include/default_client.cnf
+!include include/default_my.cnf
[mysqld.1]
diff --git a/mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6.cnf b/mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6.cnf
index b646a408..ce31d05f 100644
--- a/mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6.cnf
+++ b/mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6.cnf
@@ -1,6 +1,5 @@
# Use default setting for mysqld processes
-!include include/default_mysqld.cnf
-!include include/default_client.cnf
+!include include/default_my.cnf
[mysqld.1]
diff --git a/mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6.test b/mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6.test
index d17b32c3..2988cac9 100644
--- a/mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6.test
+++ b/mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6.test
@@ -60,4 +60,4 @@ let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
--echo Master-Host: $master_host
# clean up
-CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root';
+CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_SSL_VERIFY_SERVER_CERT=0;
diff --git a/mysql-test/suite/rpl/t/rpl_ipv6.cnf b/mysql-test/suite/rpl/t/rpl_ipv6.cnf
index 6bf97a94..52b2a80a 100644
--- a/mysql-test/suite/rpl/t/rpl_ipv6.cnf
+++ b/mysql-test/suite/rpl/t/rpl_ipv6.cnf
@@ -1,6 +1,5 @@
# Use default setting for mysqld processes
-!include include/default_mysqld.cnf
-!include include/default_client.cnf
+!include include/default_my.cnf
[mysqld.1]
diff --git a/mysql-test/suite/rpl/t/rpl_ipv6.test b/mysql-test/suite/rpl/t/rpl_ipv6.test
index f3795832..c68255a1 100644
--- a/mysql-test/suite/rpl/t/rpl_ipv6.test
+++ b/mysql-test/suite/rpl/t/rpl_ipv6.test
@@ -46,4 +46,4 @@ let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
--echo Master-Host: $master_host
# clean up
-CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root';
+CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_SSL_VERIFY_SERVER_CERT=0;
diff --git a/mysql-test/suite/rpl/t/rpl_known_bugs_detection-master.opt b/mysql-test/suite/rpl/t/rpl_known_bugs_detection-master.opt
index d4ba386a..5cbc1f9d 100644
--- a/mysql-test/suite/rpl/t/rpl_known_bugs_detection-master.opt
+++ b/mysql-test/suite/rpl/t/rpl_known_bugs_detection-master.opt
@@ -1 +1 @@
---loose-debug=d,pretend_version_50034_in_binlog
+--loose-debug-dbug=d,pretend_version_50034_in_binlog
diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_fatal-slave.opt b/mysql-test/suite/rpl/t/rpl_loaddata_fatal-slave.opt
index 9c846c79..39a1271c 100644
--- a/mysql-test/suite/rpl/t/rpl_loaddata_fatal-slave.opt
+++ b/mysql-test/suite/rpl/t/rpl_loaddata_fatal-slave.opt
@@ -1 +1 @@
---loose-debug=+d,LOAD_DATA_INFILE_has_fatal_error
+--loose-debug-dbug=+d,LOAD_DATA_INFILE_has_fatal_error
diff --git a/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test b/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test
index 7e313b37..c3a7055d 100644
--- a/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test
+++ b/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test
@@ -28,7 +28,6 @@ CHANGE MASTER TO MASTER_USE_GTID=NO;
--let $wait_condition= select count(*)=1 from information_schema.processlist where state LIKE '%Master has sent all binlog to slave%' and command='Binlog Dump'
--source include/wait_condition.inc
-
--connection slave
--source include/stop_slave.inc
--echo # Test slave with no capability gets dummy event, which is ignored.
diff --git a/mysql-test/suite/rpl/t/rpl_master_pos_wait.test b/mysql-test/suite/rpl/t/rpl_master_pos_wait.test
index 437d8412..e815502d 100644
--- a/mysql-test/suite/rpl/t/rpl_master_pos_wait.test
+++ b/mysql-test/suite/rpl/t/rpl_master_pos_wait.test
@@ -34,7 +34,7 @@ select master_pos_wait('foo', 98);
--source include/stop_slave.inc
reset slave all;
--replace_result $MASTER_MYPORT MASTER_MYPORT
-eval change master 'my_slave' to master_port=$MASTER_MYPORT, master_host='127.0.0.1', master_user='root';
+eval change master 'my_slave' to master_port=$MASTER_MYPORT, master_host='127.0.0.1', master_user='root', master_ssl_verify_server_cert=0;
set default_master_connection = 'my_slave';
--source include/start_slave.inc
diff --git a/mysql-test/suite/rpl/t/rpl_mdev33798.test b/mysql-test/suite/rpl/t/rpl_mdev33798.test
index 1448ed91..76d2de26 100644
--- a/mysql-test/suite/rpl/t/rpl_mdev33798.test
+++ b/mysql-test/suite/rpl/t/rpl_mdev33798.test
@@ -101,7 +101,7 @@ SELECT a, (
--connection server_2
--source include/stop_slave.inc
--replace_result $SERVER_MYPORT_3 MYPORT_3
-eval CHANGE MASTER 'm2' to master_port=$SERVER_MYPORT_3 , master_host='127.0.0.1', master_user='root', master_use_gtid=slave_pos;
+eval CHANGE MASTER 'm2' to master_port=$SERVER_MYPORT_3 , master_host='127.0.0.1', master_user='root', master_use_gtid=slave_pos, master_ssl_verify_server_cert=0;
--connection server_1
diff --git a/mysql-test/suite/rpl/t/rpl_mysql_upgrade.test b/mysql-test/suite/rpl/t/rpl_mysql_upgrade.test
index f44c883e..dab2e3f6 100644
--- a/mysql-test/suite/rpl/t/rpl_mysql_upgrade.test
+++ b/mysql-test/suite/rpl/t/rpl_mysql_upgrade.test
@@ -55,7 +55,7 @@ connection master;
--exec $MYSQL_UPGRADE --skip-verbose --write-binlog --force --user=root > $MYSQLTEST_VARDIR/log/mysql_upgrade.log 2>&1
let $datadir= `select @@datadir`;
-remove_file $datadir/mysql_upgrade_info;
+remove_file $datadir/mariadb_upgrade_info;
connection master;
let $after_file= query_get_value(SHOW MASTER STATUS, File, 1);
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test b/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test
index 09da8c2d..2cf18cd2 100644
--- a/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test
+++ b/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test
@@ -272,7 +272,7 @@ eval SELECT IF($retry1=$retry2, "Ok, no retry",
SET @old_format= @@GLOBAL.binlog_format;
# Use MIXED format; we cannot binlog ROW events on slave in STATEMENT format.
SET GLOBAL binlog_format= MIXED;
-SET @old_isolation= @@GLOBAL.tx_isolation;
+SET @old_isolation= @@GLOBAL.transaction_isolation;
SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED;
# Reset the worker threads to make the new settings take effect.
SET GLOBAL slave_parallel_threads=0;
@@ -317,7 +317,7 @@ SELECT * FROM t2 ORDER BY a;
--source include/stop_slave.inc
SET GLOBAL binlog_format= @old_format;
-SET GLOBAL tx_isolation= @old_isolation;
+SET GLOBAL transaction_isolation= @old_isolation;
--source include/start_slave.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_optimistic_nobinlog.test b/mysql-test/suite/rpl/t/rpl_parallel_optimistic_nobinlog.test
index ee0de499..b8df2ffa 100644
--- a/mysql-test/suite/rpl/t/rpl_parallel_optimistic_nobinlog.test
+++ b/mysql-test/suite/rpl/t/rpl_parallel_optimistic_nobinlog.test
@@ -14,7 +14,7 @@ INSERT INTO t2 VALUES (1,0), (2,0);
--connection server_2
--sync_with_master
-SET @old_isolation= @@GLOBAL.tx_isolation;
+SET @old_isolation= @@GLOBAL.transaction_isolation;
SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
--source include/stop_slave.inc
SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED;
@@ -62,7 +62,7 @@ SELECT * FROM t2 ORDER BY a;
--connection server_2
--source include/stop_slave.inc
-SET GLOBAL tx_isolation= @old_isolation;
+SET GLOBAL transaction_isolation= @old_isolation;
SET GLOBAL slave_parallel_mode=@old_parallel_mode;
SET GLOBAL slave_parallel_threads=@old_parallel_threads;
--source include/start_slave.inc
diff --git a/mysql-test/suite/rpl/t/rpl_perfschema_applier_status_by_worker.test b/mysql-test/suite/rpl/t/rpl_perfschema_applier_status_by_worker.test
index 5ef28a62..72559fc4 100644
--- a/mysql-test/suite/rpl/t/rpl_perfschema_applier_status_by_worker.test
+++ b/mysql-test/suite/rpl/t/rpl_perfschema_applier_status_by_worker.test
@@ -52,7 +52,7 @@ set @save_slave_parallel_workers= @@global.slave_parallel_workers;
# to avoid warnings
set @save_slave_transaction_retries= @@global.slave_transaction_retries;
RESET SLAVE ALL;
-evalp CHANGE MASTER 'slave1' TO MASTER_USER='root',MASTER_PORT=$MASTER_MYPORT, MASTER_HOST='127.0.0.1', MASTER_USE_GTID=slave_pos;
+evalp CHANGE MASTER 'slave1' TO MASTER_USER='root',MASTER_PORT=$MASTER_MYPORT, MASTER_HOST='127.0.0.1', MASTER_USE_GTID=slave_pos, MASTER_SSL_VERIFY_SERVER_CERT=0;
SET default_master_connection='slave1';
SET @@global.slave_parallel_workers=1;
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
diff --git a/mysql-test/suite/rpl/t/rpl_perfschema_connect_config.test b/mysql-test/suite/rpl/t/rpl_perfschema_connect_config.test
index 7b2bf8d5..e2b974c1 100644
--- a/mysql-test/suite/rpl/t/rpl_perfschema_connect_config.test
+++ b/mysql-test/suite/rpl/t/rpl_perfschema_connect_config.test
@@ -161,7 +161,6 @@ grant replication slave on *.* to replssl@localhost require ssl;
# Setup slave to use SSL for connection to master
--source include/stop_slave.inc
replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR;
-replace_column 2 ####;
eval change master to
master_user= 'replssl',
master_password= '',
@@ -232,7 +231,7 @@ CHANGE MASTER TO
master_ssl_cert= '',
master_ssl_key= '',
master_ssl_verify_server_cert=0,
- master_ssl=0,
+ master_ssl=1,
master_use_gtid=no;
--source include/start_slave.inc
@@ -244,7 +243,6 @@ CHANGE MASTER TO
--echo # 1) Test for MASTER_USE_GTID=NO
--echo
--source include/stop_slave.inc
-replace_column 2 ####;
change master to
master_user = 'root',
master_use_gtid = NO;
@@ -258,7 +256,6 @@ source include/assert.inc;
--echo
--echo # 2) Test for Auto_position= CURRENT_POS.
--echo
-replace_column 2 ####;
change master to
master_user = 'root',
master_use_gtid= CURRENT_POS;
@@ -272,7 +269,6 @@ source include/assert.inc;
--echo
--echo # 3) Test for Auto_position= SLAVE_POS
--echo
-replace_column 2 ####;
change master to
master_user = 'root',
master_use_gtid= SLAVE_POS;
diff --git a/mysql-test/suite/rpl/t/rpl_rewrite_db_sys_vars.test b/mysql-test/suite/rpl/t/rpl_rewrite_db_sys_vars.test
index fab78a92..1b2d2be1 100644
--- a/mysql-test/suite/rpl/t/rpl_rewrite_db_sys_vars.test
+++ b/mysql-test/suite/rpl/t/rpl_rewrite_db_sys_vars.test
@@ -121,7 +121,7 @@ connection slave;
--let $rpl_server_number= 2
--source include/rpl_restart_server.inc
--replace_result $MASTER_MYPORT MASTER_MYPORT
-eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root';
+eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_SSL_VERIFY_SERVER_CERT=0;
# New value
connection slave;
diff --git a/mysql-test/suite/rpl/t/rpl_rotate_logs.test b/mysql-test/suite/rpl/t/rpl_rotate_logs.test
index 4dd58931..98016667 100644
--- a/mysql-test/suite/rpl/t/rpl_rotate_logs.test
+++ b/mysql-test/suite/rpl/t/rpl_rotate_logs.test
@@ -50,7 +50,7 @@ start slave;
eval change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT, master_user='root';
reset slave;
--replace_result $MASTER_MYPORT MASTER_PORT
-eval change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT, master_user='root';
+eval change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT, master_user='root', master_ssl_verify_server_cert=0;
connection master;
reset master;
connection slave;
diff --git a/mysql-test/suite/rpl/t/rpl_row_4_bytes-master.opt b/mysql-test/suite/rpl/t/rpl_row_4_bytes-master.opt
index 3073fa4f..b3f3d539 100644
--- a/mysql-test/suite/rpl/t/rpl_row_4_bytes-master.opt
+++ b/mysql-test/suite/rpl/t/rpl_row_4_bytes-master.opt
@@ -1,2 +1,2 @@
---loose-debug=d,"old_row_based_repl_4_byte_map_id_master"
+--loose-debug-dbug=d,"old_row_based_repl_4_byte_map_id_master"
--log-bin-use-v1-row-events=1
diff --git a/mysql-test/suite/rpl/t/rpl_row_end_of_statement_loss.test b/mysql-test/suite/rpl/t/rpl_row_end_of_statement_loss.test
index 5b2d99f3..97bbc84f 100644
--- a/mysql-test/suite/rpl/t/rpl_row_end_of_statement_loss.test
+++ b/mysql-test/suite/rpl/t/rpl_row_end_of_statement_loss.test
@@ -7,7 +7,7 @@
call mtr.add_suppression("Slave IO thread did not receive an expected Rows-log end-of-statement");
call mtr.add_suppression("Relay log write failure: could not queue event from master");
-SET @save_debug= @@global.debug;
+SET @save_debug= @@global.debug_dbug;
SET GLOBAL debug_dbug="+d,simulate_stmt_end_rows_event_loss";
--source include/stop_slave.inc
--replace_result $MASTER_MYPORT MASTER_PORT
diff --git a/mysql-test/suite/rpl/t/rpl_row_img.cnf b/mysql-test/suite/rpl/t/rpl_row_img.cnf
index ed9a4292..62b5c99c 100644
--- a/mysql-test/suite/rpl/t/rpl_row_img.cnf
+++ b/mysql-test/suite/rpl/t/rpl_row_img.cnf
@@ -1,4 +1,4 @@
-!include include/default_mysqld.cnf
+!include include/default_my.cnf
[mysqld.1]
log-slave-updates
diff --git a/mysql-test/suite/rpl/t/rpl_row_img_blobs.test b/mysql-test/suite/rpl/t/rpl_row_img_blobs.test
index 21f224f5..a4f26fda 100644
--- a/mysql-test/suite/rpl/t/rpl_row_img_blobs.test
+++ b/mysql-test/suite/rpl/t/rpl_row_img_blobs.test
@@ -47,6 +47,14 @@
-- let $row_img_test_script= include/rpl_row_img_blobs.test
-- source include/rpl_row_img_general_loop.inc
+## FULL_NODUP
+
+-- let $row_img_set=server_1:FULL_NODUP:N,server_2:FULL_NODUP:Y,server_3:FULL_NODUP:Y
+-- source include/rpl_row_img_set.inc
+
+-- let $row_img_test_script= include/rpl_row_img_blobs.test
+-- source include/rpl_row_img_general_loop.inc
+
## FULL
-- let $row_img_set=server_1:FULL:N,server_2:FULL:Y,server_3:FULL:Y
diff --git a/mysql-test/suite/rpl/t/rpl_row_img_eng_full_nodup.cnf b/mysql-test/suite/rpl/t/rpl_row_img_eng_full_nodup.cnf
new file mode 100644
index 00000000..d758d29f
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_row_img_eng_full_nodup.cnf
@@ -0,0 +1 @@
+!include suite/rpl/t/rpl_row_img.cnf
diff --git a/mysql-test/suite/rpl/t/rpl_row_img_eng_full_nodup.test b/mysql-test/suite/rpl/t/rpl_row_img_eng_full_nodup.test
new file mode 100644
index 00000000..f4a53a38
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_row_img_eng_full_nodup.test
@@ -0,0 +1,67 @@
+#Want to skip this test from daily Valgrind execution
+--source include/no_valgrind_without_big.inc
+#
+# This file contains tests for FULL_NODUP row image mode
+#
+
+--let $rpl_topology= 1->2->3
+--source include/rpl_init.inc
+-- source include/have_binlog_format_row.inc
+
+-- connection server_1
+-- source include/have_innodb.inc
+-- connection server_2
+-- source include/have_innodb.inc
+-- connection server_3
+-- source include/have_innodb.inc
+-- connection server_1
+
+# Tests for different storage engines on each server,
+# but same index structure on tables. The tests are conducted
+# using FULL_NODUP binlog-row-image on all servers.
+#
+
+-- let $row_img_set=server_1:FULL_NODUP:N,server_2:FULL_NODUP:Y,server_3:FULL_NODUP:Y
+-- source include/rpl_row_img_set.inc
+
+-- let $row_img_test_script= include/rpl_row_img.test
+-- source include/rpl_row_img_general_loop.inc
+
+################################################################################
+# MDEV-33049 Assertion `marked_for_write_or_computed()' failed in bool
+# Field_new_decimal::store_value(const my_decimal*, int*)
+#
+# In FULL_NODUP mode, the before image has all fields and the after image has
+# only updated fields. Crash happened when slave was unpacking a row event
+# if the new decimal field is null in the before image.
+################################################################################
+CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 varchar(10) DEFAULT NULL,
+ c3 decimal(12,4) DEFAULT NULL);
+INSERT INTO t1(c1) VALUES (1);
+--source include/save_master_pos.inc
+--let $datadir= `SELECT @@datadir`
+
+# It will generate a row event that c3 is only in before image and it is null.
+UPDATE t1 SET c2 = 'c2';
+
+# the UPDATE will crash the slave without this fix.
+--source include/rpl_sync.inc
+
+FLUSH BINARY LOGS;
+UPDATE t1 SET c2 = "c2_new";
+
+--echo # Use 'BINLOG' statement to apply the first update row event
+--echo # BINLOG statement is same to slave applier, it should work well.
+--exec $MYSQL_BINLOG --start-position=$_master_pos $datadir$_master_file > $MYSQLTEST_VARDIR/tmp/binlog.sql
+--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/binlog.sql
+
+--echo # After 'BINLOG' statement c2's value should be "c2"
+SELECT * FROM t1;
+
+--remove_file $MYSQLTEST_VARDIR/tmp/binlog.sql
+DROP TABLE t1;
+
+-- let $row_img_set=server_1:FULL:N,server_2:FULL:Y,server_3:FULL:Y
+-- source include/rpl_row_img_set.inc
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_row_img_full_nodup.cnf b/mysql-test/suite/rpl/t/rpl_row_img_full_nodup.cnf
new file mode 100644
index 00000000..d758d29f
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_row_img_full_nodup.cnf
@@ -0,0 +1 @@
+!include suite/rpl/t/rpl_row_img.cnf
diff --git a/mysql-test/suite/rpl/t/rpl_row_img_full_nodup.test b/mysql-test/suite/rpl/t/rpl_row_img_full_nodup.test
new file mode 100644
index 00000000..12ec91bf
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_row_img_full_nodup.test
@@ -0,0 +1,34 @@
+#Want to skip this test from daily Valgrind execution
+--source include/no_valgrind_without_big.inc
+#
+# This file contains tests for FULL_NODUP row image mode
+#
+
+--let $rpl_topology= 1->2->3
+--source include/rpl_init.inc
+-- source include/have_binlog_format_row.inc
+
+-- connection server_1
+-- source include/have_innodb.inc
+-- connection server_2
+-- source include/have_innodb.inc
+-- connection server_3
+-- source include/have_innodb.inc
+-- connection server_1
+
+# Tests for different storage engines on each server,
+# but same index structure on tables. The tests are conducted
+# using FULL_NODUP binlog-row-image on all servers.
+#
+
+-- let $row_img_set=server_1:FULL_NODUP:N,server_2:FULL_NODUP:Y,server_3:FULL_NODUP:Y
+-- source include/rpl_row_img_set.inc
+
+-- let $row_img_test_script= include/rpl_row_img.test
+-- source include/rpl_row_img_general_loop.inc
+
+-- let $row_img_set=server_1:FULL:N,server_2:FULL:Y,server_3:FULL:Y
+-- source include/rpl_row_img_set.inc
+
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_row_img_sequence_full.cnf b/mysql-test/suite/rpl/t/rpl_row_img_sequence_full.cnf
index 7104b4e4..7d48e441 100644
--- a/mysql-test/suite/rpl/t/rpl_row_img_sequence_full.cnf
+++ b/mysql-test/suite/rpl/t/rpl_row_img_sequence_full.cnf
@@ -1,4 +1,4 @@
-!include include/default_mysqld.cnf
+!include include/default_my.cnf
[mysqld.1]
log-slave-updates
diff --git a/mysql-test/suite/rpl/t/rpl_row_img_sequence_full_nodup.cnf b/mysql-test/suite/rpl/t/rpl_row_img_sequence_full_nodup.cnf
new file mode 100644
index 00000000..7d48e441
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_row_img_sequence_full_nodup.cnf
@@ -0,0 +1,21 @@
+!include include/default_my.cnf
+
+[mysqld.1]
+log-slave-updates
+innodb
+gtid_domain_id=0
+
+[mysqld.2]
+log-slave-updates
+innodb
+gtid_domain_id=1
+
+[mysqld.3]
+log-slave-updates
+innodb
+gtid_domain_id=2
+
+[ENV]
+SERVER_MYPORT_1= @mysqld.1.port
+SERVER_MYPORT_2= @mysqld.2.port
+SERVER_MYPORT_3= @mysqld.3.port
diff --git a/mysql-test/suite/rpl/t/rpl_row_img_sequence_full_nodup.test b/mysql-test/suite/rpl/t/rpl_row_img_sequence_full_nodup.test
new file mode 100644
index 00000000..cc3c7df0
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_row_img_sequence_full_nodup.test
@@ -0,0 +1,51 @@
+#
+# Purpose:
+# The rpl_row_img_sequence group of tests verify that sequence MDL updates,
+# i.e. NEXTVAL and SETVAL, respect the binlog_row_image variable value when
+# written into the binary log. In particular, it ensures that only changed
+# columns are written with MINIMAL image mode, and all columns are written
+# otherwise. This test focuses on validating the behavior of
+# binlog_row_img=FULL_NODUP.
+#
+# Methodology
+# After issuing a sequence update, ensure that both 1) it was replicated
+# correctly, and 2) it was binlogged respective to the binlog_row_image value.
+# The sequence table does not use caching to ensure each update is immediately
+# binlogged. Each command is binlogged into its own unique log file, and the
+# entirety of the file is analyzed for correctness of its sequence event.
+# Specifically, mysqlbinlog is used in verbose mode so it outputs the columns
+# which belong to the event, and the columns are analyzed to ensure the correct
+# ones were logged. rpl_row_img_general_loop.inc is used to test with multiple
+# chained replicas, varying engines between InnoDB and MyISAM.
+#
+# References:
+# MDEV-28487: sequences not respect value of binlog_row_image with select
+# nextval(seq_gen)
+#
+
+--let $rpl_topology= 1->2->3
+--source include/rpl_init.inc
+--source include/have_binlog_format_row.inc
+
+--connection server_1
+--source include/have_innodb.inc
+--connection server_2
+--source include/have_innodb.inc
+--connection server_3
+--source include/have_innodb.inc
+--connection server_1
+
+--echo #
+--echo # binlog_row_image=FULL_NODUP should write all columns to the binary log
+--echo #
+--let $row_img_set=server_1:FULL_NODUP:N,server_2:FULL_NODUP:Y,server_3:FULL_NODUP:Y
+--source include/rpl_row_img_set.inc
+--let $expected_columns=(1,2,3,4,5,6,7,8)
+--let row_img_test_script= include/rpl_row_img_sequence.inc
+--source include/rpl_row_img_general_loop.inc
+
+--let $row_img_set=server_1:FULL:N,server_2:FULL:Y,server_3:FULL:Y
+--source include/rpl_row_img_set.inc
+
+--source include/rpl_end.inc
+--echo # End of tests
diff --git a/mysql-test/suite/rpl/t/rpl_row_img_sequence_min.cnf b/mysql-test/suite/rpl/t/rpl_row_img_sequence_min.cnf
index 7104b4e4..7d48e441 100644
--- a/mysql-test/suite/rpl/t/rpl_row_img_sequence_min.cnf
+++ b/mysql-test/suite/rpl/t/rpl_row_img_sequence_min.cnf
@@ -1,4 +1,4 @@
-!include include/default_mysqld.cnf
+!include include/default_my.cnf
[mysqld.1]
log-slave-updates
diff --git a/mysql-test/suite/rpl/t/rpl_row_img_sequence_noblob.cnf b/mysql-test/suite/rpl/t/rpl_row_img_sequence_noblob.cnf
index 7104b4e4..7d48e441 100644
--- a/mysql-test/suite/rpl/t/rpl_row_img_sequence_noblob.cnf
+++ b/mysql-test/suite/rpl/t/rpl_row_img_sequence_noblob.cnf
@@ -1,4 +1,4 @@
-!include include/default_mysqld.cnf
+!include include/default_my.cnf
[mysqld.1]
log-slave-updates
diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync_cond_var_per_thd.cnf b/mysql-test/suite/rpl/t/rpl_semi_sync_cond_var_per_thd.cnf
index e8e03e71..1f7fa7b4 100644
--- a/mysql-test/suite/rpl/t/rpl_semi_sync_cond_var_per_thd.cnf
+++ b/mysql-test/suite/rpl/t/rpl_semi_sync_cond_var_per_thd.cnf
@@ -2,9 +2,6 @@
[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
diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync_cond_var_per_thd.test b/mysql-test/suite/rpl/t/rpl_semi_sync_cond_var_per_thd.test
index 65b6e8b4..0567d8a5 100644
--- a/mysql-test/suite/rpl/t/rpl_semi_sync_cond_var_per_thd.test
+++ b/mysql-test/suite/rpl/t/rpl_semi_sync_cond_var_per_thd.test
@@ -26,15 +26,26 @@
--connection master
call mtr.add_suppression("Got an error reading communication packets");
+call mtr.add_suppression("Could not read packet:.* vio_errno: 1158");
+call mtr.add_suppression("Could not write packet:.* vio_errno: 1160");
+set @save_semi_sync_master_enabled= @@global.rpl_semi_sync_master_enabled;
+set @save_semi_sync_wp= @@global.rpl_semi_sync_master_wait_point;
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";
+set @@global.rpl_semi_sync_master_enabled= 1;
+set @@global.rpl_semi_sync_master_wait_point= AFTER_COMMIT;
--echo # Ensure semi-sync is on
--connection slave
+set @save_semi_sync_slave_enabled= @@global.rpl_semi_sync_master_enabled;
+--source include/stop_slave.inc
+set @@global.rpl_semi_sync_slave_enabled=1;
+--source include/start_slave.inc
+
let $status_var= rpl_semi_sync_slave_status;
let $status_var_value= ON;
source include/wait_for_status_var.inc;
@@ -66,12 +77,25 @@ source include/wait_for_status_var.inc;
--let $assert_only_after=CURRENT_TEST
--source include/assert_grep.inc
+--sync_slave_with_master
+
+
--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;
+set @@global.rpl_semi_sync_master_enabled= @save_semi_sync_master_enabled;
+set @@global.rpl_semi_sync_master_wait_point= @save_semi_sync_wp;
+
+--connection slave
+--source include/stop_slave.inc
+set @@global.rpl_semi_sync_slave_enabled= @save_semi_sync_slave_enabled;
+--source include/start_slave.inc
+
+--connection master
drop table t1, t2, t3;
+--sync_slave_with_master
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync_crash.inc b/mysql-test/suite/rpl/t/rpl_semi_sync_crash.inc
index bb705d39..1bb5ff9f 100644
--- a/mysql-test/suite/rpl/t/rpl_semi_sync_crash.inc
+++ b/mysql-test/suite/rpl/t/rpl_semi_sync_crash.inc
@@ -118,7 +118,7 @@ if (`select $server_to_crash = 2`)
{
--let $master_port=$SERVER_MYPORT_1
}
-evalp CHANGE MASTER TO master_host='127.0.0.1', master_port=$new_master_port, master_user='root', master_use_gtid=SLAVE_POS;
+evalp CHANGE MASTER TO master_host='127.0.0.1', master_port=$new_master_port, master_user='root', master_ssl_verify_server_cert=0, master_use_gtid=SLAVE_POS;
set global rpl_semi_sync_slave_enabled = 1;
set @@global.gtid_slave_pos=@@global.gtid_binlog_pos;
--source include/start_slave.inc
diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync_slave_reply_fail.test b/mysql-test/suite/rpl/t/rpl_semi_sync_slave_reply_fail.test
index 84462ed6..30aeea48 100644
--- a/mysql-test/suite/rpl/t/rpl_semi_sync_slave_reply_fail.test
+++ b/mysql-test/suite/rpl/t/rpl_semi_sync_slave_reply_fail.test
@@ -40,7 +40,7 @@ create table t1 (i int);
--connection slave
set global rpl_semi_sync_slave_enabled = ON;
CALL mtr.add_suppression("Semi-sync slave net_flush*");
-SET @save_debug= @@global.debug;
+SET @save_debug= @@global.debug_dbug;
SET GLOBAL debug_dbug="+d,semislave_failed_net_flush";
--source include/start_slave.inc
diff --git a/mysql-test/suite/rpl/t/rpl_semisync_ali_issues.test b/mysql-test/suite/rpl/t/rpl_semisync_ali_issues.test
index c5c1daa4..ba9c5f04 100644
--- a/mysql-test/suite/rpl/t/rpl_semisync_ali_issues.test
+++ b/mysql-test/suite/rpl/t/rpl_semisync_ali_issues.test
@@ -284,7 +284,7 @@ INSERT INTO t1 VALUES (2);
show status like 'Rpl_semi_sync_master_clients';
--echo # Test failure of select error .
-SET GLOBAL debug = 'd,rpl_semisync_simulate_select_error';
+SET GLOBAL debug_dbug = 'd,rpl_semisync_simulate_select_error';
# It can still receive ACK from semi-sync slave
INSERT INTO t1 VALUES(3);
sync_slave_with_master;
@@ -292,7 +292,7 @@ sync_slave_with_master;
connection con1;
--echo # Test failure of pthread_create
SET GLOBAL rpl_semi_sync_master_enabled = 0;
-SET GLOBAL debug = 'd,rpl_semisync_simulate_create_thread_failure';
+SET GLOBAL debug_dbug = 'd,rpl_semisync_simulate_create_thread_failure';
SET GLOBAL rpl_semi_sync_master_enabled= ON;
--let $wait_condition= SELECT @@global.rpl_semi_sync_master_enabled = 0
@@ -300,7 +300,7 @@ SET GLOBAL rpl_semi_sync_master_enabled= ON;
# Todo: implement the thread join failure simulation
--echo # Test failure of pthread_join
-#SET GLOBAL DEBUG = 'd,rpl_semisync_simulate_thread_join_failure';
+#SET GLOBAL DEBUG_DBUG = 'd,rpl_semisync_simulate_thread_join_failure';
#SET GLOBAL rpl_semi_sync_master_enabled= ON;
#
#--let $wait_condition= SELECT @@global.rpl_semi_sync_master_enabled = 0
@@ -310,7 +310,7 @@ SET GLOBAL rpl_semi_sync_master_enabled= OFF;
--echo #
--echo # Failure on registering semisync slave
--echo #
-SET GLOBAL debug= 'd,rpl_semisync_simulate_add_slave_failure';
+SET GLOBAL debug_dbug= 'd,rpl_semisync_simulate_add_slave_failure';
SET GLOBAL rpl_semi_sync_master_enabled= ON;
connection slave;
@@ -324,7 +324,7 @@ connection con1;
# Todo: implement the add_slave_failure simulation. Meanwhile
# the status will be 1.
# show status like 'Rpl_semi_sync_master_clients';
-SET GLOBAL debug='';
+SET GLOBAL debug_dbug='';
--let $status_var= Rpl_semi_sync_master_clients
--let $status_var_value= 1
@@ -423,6 +423,5 @@ SET GLOBAL rpl_semi_sync_master_enabled = 0;
DROP TABLE t1;
connection slave;
SET GLOBAL rpl_semi_sync_slave_enabled = 0;
-stop slave;start slave;
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_set_statement_default_master.test b/mysql-test/suite/rpl/t/rpl_set_statement_default_master.test
index d30da61b..e121e7ba 100644
--- a/mysql-test/suite/rpl/t/rpl_set_statement_default_master.test
+++ b/mysql-test/suite/rpl/t/rpl_set_statement_default_master.test
@@ -22,7 +22,9 @@ eval SET STATEMENT default_master_connection = 'm1' FOR
RESET SLAVE ALL;
--replace_result $MASTER_MYPORT MASTER_MYPORT
-eval CHANGE MASTER 'm1' TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root';
+eval CHANGE MASTER 'm1' TO MASTER_HOST='127.0.0.1',
+ MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root',
+ MASTER_SSL_VERIFY_SERVER_CERT=0;
SET STATEMENT default_master_connection = 'm1' FOR START SLAVE;
set default_master_connection = 'm1';
diff --git a/mysql-test/suite/rpl/t/rpl_show_slave_hosts.test b/mysql-test/suite/rpl/t/rpl_show_slave_hosts.test
index 84c5c215..afac2984 100644
--- a/mysql-test/suite/rpl/t/rpl_show_slave_hosts.test
+++ b/mysql-test/suite/rpl/t/rpl_show_slave_hosts.test
@@ -15,7 +15,7 @@ connect (slave2,127.0.0.1,root,,test,$SLAVE_MYPORT2,);
connection slave2;
RESET SLAVE;
--replace_result $MASTER_MYPORT MASTER_PORT
---eval CHANGE MASTER TO master_host='127.0.0.1',master_port=$MASTER_MYPORT,master_user='root'
+--eval CHANGE MASTER TO master_host='127.0.0.1',master_port=$MASTER_MYPORT,master_user='root', master_ssl_verify_server_cert=0
START SLAVE IO_THREAD;
source include/wait_for_slave_io_to_start.inc;
diff --git a/mysql-test/suite/rpl/t/rpl_skip_incident-master.opt b/mysql-test/suite/rpl/t/rpl_skip_incident-master.opt
index 912801de..4e746bf1 100644
--- a/mysql-test/suite/rpl/t/rpl_skip_incident-master.opt
+++ b/mysql-test/suite/rpl/t/rpl_skip_incident-master.opt
@@ -1 +1 @@
---loose-debug=+d,incident_database_resync_on_replace
+--loose-debug-dbug=+d,incident_database_resync_on_replace
diff --git a/mysql-test/suite/rpl/t/rpl_slave_shutdown_mdev20821.test b/mysql-test/suite/rpl/t/rpl_slave_shutdown_mdev20821.test
index 6f73de98..1179d7bf 100644
--- a/mysql-test/suite/rpl/t/rpl_slave_shutdown_mdev20821.test
+++ b/mysql-test/suite/rpl/t/rpl_slave_shutdown_mdev20821.test
@@ -23,7 +23,7 @@ set default_master_connection = '';
set default_master_connection = 'm2';
--replace_result $SERVER_MYPORT_2 SERVER_MYPORT_2
-eval change master to master_host='127.0.0.1', master_port=$SERVER_MYPORT_2, master_user='root', master_use_gtid=slave_pos;
+eval change master to master_host='127.0.0.1', master_port=$SERVER_MYPORT_2, master_user='root', master_ssl_verify_server_cert=0, master_use_gtid=slave_pos;
--source include/start_slave.inc
select @@global.slave_parallel_workers as two;
diff --git a/mysql-test/suite/rpl/t/rpl_ssl.test b/mysql-test/suite/rpl/t/rpl_ssl.test
index 0420a6c8..ad9a191d 100644
--- a/mysql-test/suite/rpl/t/rpl_ssl.test
+++ b/mysql-test/suite/rpl/t/rpl_ssl.test
@@ -106,7 +106,7 @@ sync_slave_with_master;
--source include/stop_slave.inc
CHANGE MASTER TO
master_user = 'root',
- master_ssl = 0,
+ master_ssl = 1,
master_ssl_ca = '',
master_ssl_cert = '',
master_ssl_key = '';
diff --git a/mysql-test/suite/rpl/t/rpl_ssl1.test b/mysql-test/suite/rpl/t/rpl_ssl1.test
index 04f6cfff..0caaae25 100644
--- a/mysql-test/suite/rpl/t/rpl_ssl1.test
+++ b/mysql-test/suite/rpl/t/rpl_ssl1.test
@@ -16,7 +16,7 @@ sync_slave_with_master;
#trying to use this user without ssl
stop slave;
--source include/wait_for_slave_to_stop.inc
-change master to master_user='replssl',master_password='';
+change master to master_user='replssl',master_password='',master_ssl=0;
start slave;
#showing that replication don't work
@@ -34,7 +34,11 @@ select * from t1;
--source include/stop_slave_sql.inc
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
-eval change master to master_ssl=1 , master_ssl_ca ='$MYSQL_TEST_DIR/std_data/cacert.pem', master_ssl_cert='$MYSQL_TEST_DIR/std_data/client-cert.pem', master_ssl_key='$MYSQL_TEST_DIR/std_data/client-key.pem';
+eval change master to
+ master_ssl=1,
+ master_ssl_ca ='$MYSQL_TEST_DIR/std_data/cacert.pem',
+ master_ssl_cert='$MYSQL_TEST_DIR/std_data/client-cert.pem',
+ master_ssl_key='$MYSQL_TEST_DIR/std_data/client-key.pem';
start slave;
--source include/wait_for_slave_to_start.inc
@@ -85,28 +89,53 @@ create table t1 (t int);
insert into t1 values (1);
sync_slave_with_master;
-
-echo on slave;
-#checking that replication is ok
select * from t1;
#checking show slave status
source include/show_slave_status.inc;
--source include/check_slave_is_running.inc
-# ==== Clean up ====
+# MDEV-31855 validate with master_password
+connection master;
+create user replssl@127.0.0.1 identified by "sslrepl";
+grant replication slave on *.* to replssl@127.0.0.1 require ssl;
+connection slave;
+stop slave;
+--source include/wait_for_slave_to_stop.inc
+eval change master to
+ master_host="127.0.0.1",
+ master_user='replssl',
+ master_password="sslrepl",
+ master_ssl=1,
+ master_ssl_verify_server_cert=1,
+ master_ssl_ca ='',
+ master_ssl_cert='',
+ master_ssl_key='';
+start slave;
+--source include/wait_for_slave_to_start.inc
+
+show tables;
connection master;
drop table t1;
sync_slave_with_master;
+show tables;
+
+# ==== Clean up ====
--source include/stop_slave.inc
CHANGE MASTER TO
master_host="127.0.0.1",
+ master_user='root',
+ master_password='',
master_ssl_ca ='',
master_ssl_cert='',
master_ssl_key='',
master_ssl_verify_server_cert=0,
- master_ssl=0;
+ master_ssl=1;
+connection master;
+drop user replssl@127.0.0.1;
+connection slave;
+drop user replssl@127.0.0.1;
--let $rpl_only_running_threads= 1
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_start_alter_7.test b/mysql-test/suite/rpl/t/rpl_start_alter_7.test
index 21c21c85..0e72b43e 100644
--- a/mysql-test/suite/rpl/t/rpl_start_alter_7.test
+++ b/mysql-test/suite/rpl/t/rpl_start_alter_7.test
@@ -36,9 +36,9 @@ set global gtid_strict_mode=1;
--disable_warnings
--disable_query_log
--replace_result $SERVER_MYPORT_1 MYPORT_1
-eval change master 'm1' to master_port=$SERVER_MYPORT_1 , master_host='127.0.0.1', master_user='root', master_use_gtid=slave_pos;
+eval change master 'm1' to master_port=$SERVER_MYPORT_1 , master_host='127.0.0.1', master_user='root', master_ssl_verify_server_cert=0, master_use_gtid=slave_pos;
--replace_result $SERVER_MYPORT_2 MYPORT_2
-eval change master 'm2' to master_port=$SERVER_MYPORT_2 , master_host='127.0.0.1', master_user='root', master_use_gtid=slave_pos;
+eval change master 'm2' to master_port=$SERVER_MYPORT_2 , master_host='127.0.0.1', master_user='root', master_ssl_verify_server_cert=0, master_use_gtid=slave_pos;
--enable_query_log
--enable_warnings
diff --git a/mysql-test/suite/rpl/t/rpl_start_alter_8.test b/mysql-test/suite/rpl/t/rpl_start_alter_8.test
index c8c5ac74..ac7abca2 100644
--- a/mysql-test/suite/rpl/t/rpl_start_alter_8.test
+++ b/mysql-test/suite/rpl/t/rpl_start_alter_8.test
@@ -35,9 +35,9 @@ set global gtid_strict_mode=1;
--disable_warnings
--disable_query_log
--replace_result $SERVER_MYPORT_1 MYPORT_1
-eval change master 'm1' to master_port=$SERVER_MYPORT_1 , master_host='127.0.0.1', master_user='root', master_use_gtid=slave_pos;
+eval change master 'm1' to master_port=$SERVER_MYPORT_1 , master_host='127.0.0.1', master_user='root', master_ssl_verify_server_cert=0, master_use_gtid=slave_pos;
--replace_result $SERVER_MYPORT_2 MYPORT_2
-eval change master 'm2' to master_port=$SERVER_MYPORT_2 , master_host='127.0.0.1', master_user='root', master_use_gtid=slave_pos;
+eval change master 'm2' to master_port=$SERVER_MYPORT_2 , master_host='127.0.0.1', master_user='root', master_ssl_verify_server_cert=0, master_use_gtid=slave_pos;
--enable_query_log
--enable_warnings
diff --git a/mysql-test/suite/rpl/t/rpl_start_alter_mysqlbinlog_2.test b/mysql-test/suite/rpl/t/rpl_start_alter_mysqlbinlog_2.test
index 9d9675c6..1cbc5b67 100644
--- a/mysql-test/suite/rpl/t/rpl_start_alter_mysqlbinlog_2.test
+++ b/mysql-test/suite/rpl/t/rpl_start_alter_mysqlbinlog_2.test
@@ -71,9 +71,9 @@ SET GLOBAL gtid_strict_mode=1;
--disable_warnings
--disable_query_log
--replace_result $SERVER_MYPORT_1 MYPORT_1
-eval CHANGE MASTER 'm1' TO MASTER_PORT=$SERVER_MYPORT_1, MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_USE_GTID=slave_pos;
+eval CHANGE MASTER 'm1' TO MASTER_PORT=$SERVER_MYPORT_1, MASTER_HOST='127.0.0.1', MASTER_USER='root', master_ssl_verify_server_cert=0, MASTER_USE_GTID=slave_pos;
--replace_result $SERVER_MYPORT_2 MYPORT_2
-eval CHANGE MASTER 'm2' TO MASTER_PORT=$SERVER_MYPORT_2, MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_USE_GTID=slave_pos;
+eval CHANGE MASTER 'm2' TO MASTER_PORT=$SERVER_MYPORT_2, MASTER_HOST='127.0.0.1', MASTER_USER='root', master_ssl_verify_server_cert=0, MASTER_USE_GTID=slave_pos;
--enable_query_log
--enable_warnings
diff --git a/mysql-test/suite/rpl/t/rpl_start_alter_restart_master.test b/mysql-test/suite/rpl/t/rpl_start_alter_restart_master.test
index aac3af6f..959af0ef 100644
--- a/mysql-test/suite/rpl/t/rpl_start_alter_restart_master.test
+++ b/mysql-test/suite/rpl/t/rpl_start_alter_restart_master.test
@@ -15,7 +15,7 @@ CHANGE MASTER TO MASTER_USE_GTID=NO;
--source include/start_slave.inc
--connection slave
-SET @old_debug_slave= @@global.debug;
+SET @old_debug_slave= @@global.debug_dbug;
stop slave;
--let $gtid_strict_mode= `select @@gtid_strict_mode`
--let $slave_parallel_threads= `select @@slave_parallel_threads`
@@ -28,7 +28,7 @@ start slave;
--connection master
call mtr.add_suppression("ALTER query started at .+ could not be completed");
-SET @old_debug_master= @@global.debug;
+SET @old_debug_master= @@global.debug_dbug;
--let $binlog_alter_two_phase= `select @@binlog_alter_two_phase`
set binlog_alter_two_phase=true;
create table t3( a int primary key, b int) engine=innodb;
diff --git a/mysql-test/suite/rpl/t/rpl_start_alter_restart_slave.test b/mysql-test/suite/rpl/t/rpl_start_alter_restart_slave.test
index 5dcb0bf8..43586fdd 100644
--- a/mysql-test/suite/rpl/t/rpl_start_alter_restart_slave.test
+++ b/mysql-test/suite/rpl/t/rpl_start_alter_restart_slave.test
@@ -6,11 +6,11 @@
#
--source include/have_log_bin.inc
--source include/have_innodb.inc
---source include/master-slave.inc
--source include/have_debug.inc
+--source include/master-slave.inc
--connection slave
-SET @old_debug_slave= @@global.debug;
+SET @old_debug_slave= @@global.debug_dbug;
--source include/stop_slave.inc
--let $gtid_strict_mode= `select @@gtid_strict_mode`
--let $slave_parallel_threads= `select @@slave_parallel_threads`
@@ -25,7 +25,7 @@ set global debug_dbug="+d,rpl_slave_stop_CA_before_binlog";
#
# SLAVE Shutdown
--connection master
-SET @old_debug_master= @@global.debug;
+SET @old_debug_master= @@global.debug_dbug;
set global debug_dbug="+d,start_alter_delay_master";
--let $binlog_alter_two_phase= `select @@binlog_alter_two_phase`
set global binlog_alter_two_phase=true;
@@ -116,10 +116,10 @@ SET GLOBAL debug_dbug= @old_debug_master;
set DEBUG_SYNC= 'RESET';
--sync_slave_with_master
-stop slave;
+--source include/stop_slave.inc
--eval set global slave_parallel_threads = $slave_parallel_threads;
--eval set global slave_parallel_mode = $slave_parallel_mode;
--eval set global gtid_strict_mode = $gtid_strict_mode;
set DEBUG_SYNC= 'RESET';
-start slave;
+--source include/start_slave.inc
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_upgrade_master_info.test b/mysql-test/suite/rpl/t/rpl_upgrade_master_info.test
index fb0e3cf4..dc904166 100644
--- a/mysql-test/suite/rpl/t/rpl_upgrade_master_info.test
+++ b/mysql-test/suite/rpl/t/rpl_upgrade_master_info.test
@@ -155,7 +155,7 @@ INSERT INTO t1 VALUES (6);
--connection slave
# Fix the port after we replaced master.info.
--replace_result $SERVER_MYPORT_1 SERVER_MYPORT_1
-eval CHANGE MASTER TO master_host='127.0.0.1', master_port=$SERVER_MYPORT_1;
+eval CHANGE MASTER TO master_host='127.0.0.1', master_port=$SERVER_MYPORT_1, MASTER_SSL=1;
--source include/start_slave.inc
--source include/sync_with_master_gtid.inc
SELECT * FROM t1 ORDER BY a;
diff --git a/mysql-test/suite/rpl/t/rpl_xa.inc b/mysql-test/suite/rpl/t/rpl_xa.inc
index d22d2d2e..30e7a4bb 100644
--- a/mysql-test/suite/rpl/t/rpl_xa.inc
+++ b/mysql-test/suite/rpl/t/rpl_xa.inc
@@ -363,7 +363,7 @@ sync_slave_with_master;
# set a strong isolation level to keep the read view below.
# alternatively a long-running select can do that too even in read-committed
-set session tx_isolation='repeatable-read';
+set session transaction_isolation='repeatable-read';
start transaction;
# opens a read view to disable purge on the slave
select * from t1;
diff --git a/mysql-test/suite/rpl/t/rpl_xa_empty_transaction.cnf b/mysql-test/suite/rpl/t/rpl_xa_empty_transaction.cnf
index 92acd0c7..261852a4 100644
--- a/mysql-test/suite/rpl/t/rpl_xa_empty_transaction.cnf
+++ b/mysql-test/suite/rpl/t/rpl_xa_empty_transaction.cnf
@@ -1,4 +1,4 @@
-!include include/default_mysqld.cnf
+!include include/default_my.cnf
[mysqld.1]
log-slave-updates
diff --git a/mysql-test/suite/rpl/t/show_status_stop_slave_race-7126.test b/mysql-test/suite/rpl/t/show_status_stop_slave_race-7126.test
index 815b2537..a350d093 100644
--- a/mysql-test/suite/rpl/t/show_status_stop_slave_race-7126.test
+++ b/mysql-test/suite/rpl/t/show_status_stop_slave_race-7126.test
@@ -22,7 +22,7 @@ call mtr.add_suppression("Could not read packet:.* errno: 11");
# aborted by the master due to conflicting server_id from multiple connections.
--let $rpl_allow_error= 1
--source include/wait_for_slave_to_stop.inc
-start slave;
+--source include/start_slave.inc
--connection master
--source include/rpl_end.inc