summaryrefslogtreecommitdiff
path: root/mysql-test/suite/rpl/r
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/rpl/r')
-rw-r--r--mysql-test/suite/rpl/r/rpl_000010.result5
-rw-r--r--mysql-test/suite/rpl/r/rpl_auto_increment_bug33029.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_binlog_corruption.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_binlog_dump_slave_gtid_state_info.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_binlog_errors.result5
-rw-r--r--mysql-test/suite/rpl/r/rpl_blackhole_row_annotate.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_cant_read_event_incident.result9
-rw-r--r--mysql-test/suite/rpl/r/rpl_change_master.result5
-rw-r--r--mysql-test/suite/rpl/r/rpl_change_master_demote.result687
-rw-r--r--mysql-test/suite/rpl/r/rpl_checksum.result9
-rw-r--r--mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_colSize.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_corruption.result5
-rw-r--r--mysql-test/suite/rpl/r/rpl_cross_version.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_deadlock_innodb.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_delayed_slave.result7
-rw-r--r--mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result34
-rw-r--r--mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result34
-rw-r--r--mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result42
-rw-r--r--mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result42
-rw-r--r--mysql-test/suite/rpl/r/rpl_gtid_basic.result6
-rw-r--r--mysql-test/suite/rpl/r/rpl_gtid_crash.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_gtid_errorhandling.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_gtid_excess_initial_delay.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_gtid_master_promote.result12
-rw-r--r--mysql-test/suite/rpl/r/rpl_gtid_mdev4473.result10
-rw-r--r--mysql-test/suite/rpl/r/rpl_gtid_mdev4820.result6
-rw-r--r--mysql-test/suite/rpl/r/rpl_gtid_mdev9033.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_gtid_misc.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_gtid_nobinlog.result6
-rw-r--r--mysql-test/suite/rpl/r/rpl_gtid_reconnect.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_gtid_sort.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_gtid_startpos.result21
-rw-r--r--mysql-test/suite/rpl/r/rpl_gtid_stop_start.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_gtid_until.result10
-rw-r--r--mysql-test/suite/rpl/r/rpl_heartbeat_basic.result24
-rw-r--r--mysql-test/suite/rpl/r/rpl_heartbeat_ssl.result3
-rw-r--r--mysql-test/suite/rpl/r/rpl_hrtime.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_innodb_bug68220.result233
-rw-r--r--mysql-test/suite/rpl/r/rpl_loaddata.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_log_pos.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_manual_change_index_file.result5
-rw-r--r--mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result3
-rw-r--r--mysql-test/suite/rpl/r/rpl_mdev382.result6
-rw-r--r--mysql-test/suite/rpl/r/rpl_mdev6020.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_mdev6386.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_mdev_17614.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result5
-rw-r--r--mysql-test/suite/rpl/r/rpl_mysql57_stm_temporal_round.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_mysql80_stm_temporal_round.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_old_master.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_old_master_29078.result30
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_29322.result10
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_mdev6589.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_multilevel2.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_temptable.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_perfschema_applier_status_by_coordinator.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_perfschema_connect_config.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_read_new_relay_log_info.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_read_old_relay_log_info.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_reset_slave_fail.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_001.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_colSize.result102
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result5
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_loaddata_concurrent.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result14
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_reset_slave.result13
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_until.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_seconds_behind_master_spike.result3
-rw-r--r--mysql-test/suite/rpl/r/rpl_semi_sync.result8
-rw-r--r--mysql-test/suite/rpl/r/rpl_semi_sync_after_sync.result8
-rw-r--r--mysql-test/suite/rpl/r/rpl_semi_sync_after_sync_row.result8
-rw-r--r--mysql-test/suite/rpl/r/rpl_server_id2.result3
-rw-r--r--mysql-test/suite/rpl/r/rpl_server_id_ignore.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_skip_replication.result5
-rw-r--r--mysql-test/suite/rpl/r/rpl_slave_alias_replica.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_slave_max_statement_time.result170
-rw-r--r--mysql-test/suite/rpl/r/rpl_slave_skip.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_sp.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_start_alter_mysqlbinlog_1.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_start_alter_options.result10
-rw-r--r--mysql-test/suite/rpl/r/rpl_start_alter_restart_master.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_000001.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result5
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result5
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_reset_slave.result13
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_until.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_stop_slave.result5
-rw-r--r--mysql-test/suite/rpl/r/rpl_timestamp.result10
-rw-r--r--mysql-test/suite/rpl/r/rpl_trigger.result17
-rw-r--r--mysql-test/suite/rpl/r/rpl_upgrade_master_info.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_using_gtid_default.result144
-rw-r--r--mysql-test/suite/rpl/r/rpl_xa_gap_lock.result2
-rw-r--r--mysql-test/suite/rpl/r/semisync_future-7591.result6
96 files changed, 1523 insertions, 427 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_000010.result b/mysql-test/suite/rpl/r/rpl_000010.result
index ae989f25e1b..a86d71bd33f 100644
--- a/mysql-test/suite/rpl/r/rpl_000010.result
+++ b/mysql-test/suite/rpl/r/rpl_000010.result
@@ -1,5 +1,10 @@
include/master-slave.inc
[connection master]
+connection slave;
+include/stop_slave.inc
+CHANGE MASTER TO MASTER_USE_GTID=NO;
+include/start_slave.inc
+connection master;
create table t1 (n int not null auto_increment primary key);
insert into t1 values(NULL);
insert into t1 values(2);
diff --git a/mysql-test/suite/rpl/r/rpl_auto_increment_bug33029.result b/mysql-test/suite/rpl/r/rpl_auto_increment_bug33029.result
index c75e65ebb6f..49f3ac455f1 100644
--- a/mysql-test/suite/rpl/r/rpl_auto_increment_bug33029.result
+++ b/mysql-test/suite/rpl/r/rpl_auto_increment_bug33029.result
@@ -38,6 +38,8 @@ id
==== Clean up ====
stop slave sql_thread;
include/cleanup_fake_relay_log.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
DROP TABLE t1, t2;
DROP PROCEDURE p1;
DROP PROCEDURE p2;
diff --git a/mysql-test/suite/rpl/r/rpl_binlog_corruption.result b/mysql-test/suite/rpl/r/rpl_binlog_corruption.result
index 5c141eed596..730fb67ebc9 100644
--- a/mysql-test/suite/rpl/r/rpl_binlog_corruption.result
+++ b/mysql-test/suite/rpl/r/rpl_binlog_corruption.result
@@ -14,4 +14,6 @@ include/wait_for_slave_sql_error.inc [errno=1594]
Last_SQL_Error = Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MariaDB code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave.
==== Clean up ====
include/cleanup_fake_relay_log.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_binlog_dump_slave_gtid_state_info.result b/mysql-test/suite/rpl/r/rpl_binlog_dump_slave_gtid_state_info.result
index 98688df7273..96b14bc1d9c 100644
--- a/mysql-test/suite/rpl/r/rpl_binlog_dump_slave_gtid_state_info.result
+++ b/mysql-test/suite/rpl/r/rpl_binlog_dump_slave_gtid_state_info.result
@@ -5,6 +5,8 @@ SET GLOBAL LOG_WARNINGS=2;
connection 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
connection master;
"Test Case 1: Start binlog_dump to slave_server(#), pos(master-bin.000001, ###), using_gtid(1), gtid('')"
diff --git a/mysql-test/suite/rpl/r/rpl_binlog_errors.result b/mysql-test/suite/rpl/r/rpl_binlog_errors.result
index 4c667bd7f5a..0c79b079bd6 100644
--- a/mysql-test/suite/rpl/r/rpl_binlog_errors.result
+++ b/mysql-test/suite/rpl/r/rpl_binlog_errors.result
@@ -232,6 +232,9 @@ connection master;
#######################################################################
include/rpl_reset.inc
connection slave;
+include/stop_slave.inc
+CHANGE MASTER TO MASTER_USE_GTID=NO;
+include/start_slave.inc
call mtr.add_suppression("Slave I/O: Relay log write failure: could not queue event from master.*");
call mtr.add_suppression("Error writing file .*");
call mtr.add_suppression("Could not use .*");
@@ -277,5 +280,7 @@ include/stop_slave_sql.inc
Warnings:
Note 1255 Slave already has been stopped
RESET SLAVE;
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
RESET MASTER;
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_blackhole_row_annotate.result b/mysql-test/suite/rpl/r/rpl_blackhole_row_annotate.result
index 53420891754..2c602ea53aa 100644
--- a/mysql-test/suite/rpl/r/rpl_blackhole_row_annotate.result
+++ b/mysql-test/suite/rpl/r/rpl_blackhole_row_annotate.result
@@ -200,7 +200,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=1/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
diff --git a/mysql-test/suite/rpl/r/rpl_cant_read_event_incident.result b/mysql-test/suite/rpl/r/rpl_cant_read_event_incident.result
index 5aff978538f..86659816f6c 100644
--- a/mysql-test/suite/rpl/r/rpl_cant_read_event_incident.result
+++ b/mysql-test/suite/rpl/r/rpl_cant_read_event_incident.result
@@ -2,6 +2,9 @@ include/master-slave.inc
[connection master]
connection slave;
include/stop_slave.inc
+CHANGE MASTER TO MASTER_USE_GTID=NO;
+include/start_slave.inc
+include/stop_slave.inc
connection master;
call mtr.add_suppression("Error in Log_event::read_log_event()");
include/rpl_stop_server.inc [server_number=1]
@@ -10,7 +13,9 @@ show binlog events;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error
connection slave;
call mtr.add_suppression("Slave I/O: Got fatal error 1236 from master when reading data from binary log");
-reset slave;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
start slave;
include/wait_for_slave_param.inc [Last_IO_Errno]
Last_IO_Errno = '1236'
@@ -20,6 +25,8 @@ reset master;
connection slave;
stop slave;
reset slave;
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
drop table if exists t;
reset master;
End of the tests
diff --git a/mysql-test/suite/rpl/r/rpl_change_master.result b/mysql-test/suite/rpl/r/rpl_change_master.result
index 48cec72d917..88801b07bba 100644
--- a/mysql-test/suite/rpl/r/rpl_change_master.result
+++ b/mysql-test/suite/rpl/r/rpl_change_master.result
@@ -26,4 +26,9 @@ 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
diff --git a/mysql-test/suite/rpl/r/rpl_change_master_demote.result b/mysql-test/suite/rpl/r/rpl_change_master_demote.result
new file mode 100644
index 00000000000..38cff83829e
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_change_master_demote.result
@@ -0,0 +1,687 @@
+include/master-slave.inc
+[connection master]
+connection slave;
+include/stop_slave.inc
+change master to master_use_gtid=slave_pos;
+include/start_slave.inc
+include/sync_with_master_gtid.inc
+#
+# Test Case 1: When both gtid_binlog_pos and gtid_slave_pos are
+# empty, MASTER_DEMOTE_TO_SLAVE=1 results in no change to replication
+# state.
+#
+include/rpl_change_master_demote.inc
+##############################################
+# Connection semantics change:
+# * True primary is now connection 'slave'
+# * True replica is now connection 'master'
+##############################################
+connection master;
+SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
+VARIABLE_NAME GLOBAL_VALUE
+GTID_BINLOG_POS
+GTID_CURRENT_POS
+GTID_SLAVE_POS
+# First ensure gtid_slave_pos after master_demote_to_slave matches
+# gtid_current_pos calculation
+CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_use_gtid=slave_pos, master_demote_to_slave=1 ;
+SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
+VARIABLE_NAME GLOBAL_VALUE
+GTID_BINLOG_POS
+GTID_CURRENT_POS
+GTID_SLAVE_POS
+# Validating gtid_slave_pos == gtid_binlog_pos..
+# ..success
+connection slave;
+# Ensuring replication works correctly after role swap
+connection slave;
+set session gtid_domain_id= 0;
+CREATE TABLE repl_t (a int);
+INSERT INTO repl_t VALUES (1);
+connection master;
+# Validating that replication works..
+# ..success
+# Cleaning up replication check data
+connection slave;
+DROP TABLE repl_t;
+connection master;
+SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
+VARIABLE_NAME GLOBAL_VALUE
+GTID_BINLOG_POS
+GTID_CURRENT_POS 0-2-3
+GTID_SLAVE_POS 0-2-3
+##############################################
+# Connection semantics change:
+# * True primary is back to connection 'master'
+# * True replica is back to connection 'slave'
+##############################################
+connection master;
+connection slave;
+CHANGE MASTER TO master_host='127.0.0.1', master_port=MASTER_PORT, master_user='root', master_use_gtid=slave_pos, master_demote_to_slave=1;
+#
+# Test Case 2: If gtid_slave_pos is empty, gtid_binlog_pos will
+# completely overwrite it with MASTER_DEMOTE_TO_SLAVE=1.
+#
+connection slave;
+include/stop_slave.inc
+RESET MASTER;
+set @@global.gtid_slave_pos="";
+include/start_slave.inc
+connection master;
+RESET MASTER;
+set @@global.gtid_slave_pos="";
+set session gtid_domain_id= 0;
+CREATE TABLE t1 (a int);
+INSERT INTO t1 VALUES (1);
+include/save_master_gtid.inc
+connection slave;
+include/sync_with_master_gtid.inc
+include/rpl_change_master_demote.inc
+##############################################
+# Connection semantics change:
+# * True primary is now connection 'slave'
+# * True replica is now connection 'master'
+##############################################
+connection master;
+SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
+VARIABLE_NAME GLOBAL_VALUE
+GTID_BINLOG_POS 0-1-2
+GTID_CURRENT_POS 0-1-2
+GTID_SLAVE_POS
+# First ensure gtid_slave_pos after master_demote_to_slave matches
+# gtid_current_pos calculation
+CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_use_gtid=slave_pos, master_demote_to_slave=1 ;
+SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
+VARIABLE_NAME GLOBAL_VALUE
+GTID_BINLOG_POS 0-1-2
+GTID_CURRENT_POS 0-1-2
+GTID_SLAVE_POS 0-1-2
+# Validating gtid_slave_pos == gtid_binlog_pos..
+# ..success
+connection slave;
+# Ensuring replication works correctly after role swap
+connection slave;
+set session gtid_domain_id= 0;
+CREATE TABLE repl_t (a int);
+INSERT INTO repl_t VALUES (1);
+connection master;
+# Validating that replication works..
+# ..success
+# Cleaning up replication check data
+connection slave;
+DROP TABLE repl_t;
+connection master;
+SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
+VARIABLE_NAME GLOBAL_VALUE
+GTID_BINLOG_POS 0-1-2
+GTID_CURRENT_POS 0-2-5
+GTID_SLAVE_POS 0-2-5
+##############################################
+# Connection semantics change:
+# * True primary is back to connection 'master'
+# * True replica is back to connection 'slave'
+##############################################
+connection master;
+connection slave;
+CHANGE MASTER TO master_host='127.0.0.1', master_port=MASTER_PORT, master_user='root', master_use_gtid=slave_pos, master_demote_to_slave=1;
+#
+# Test Case 3: Using a single domain id, if neither gtid_slave_pos nor
+# gtid_binlog_pos are empty, and gtid_binlog_pos is more recent, then
+# gtid_binlog_pos will overwrite gtid_slave_pos when
+# MASTER_DEMOTE_TO_SLAVE=1.
+#
+connection master;
+INSERT INTO t1 VALUES (2);
+include/save_master_gtid.inc
+connection slave;
+include/sync_with_master_gtid.inc
+include/rpl_change_master_demote.inc
+##############################################
+# Connection semantics change:
+# * True primary is now connection 'slave'
+# * True replica is now connection 'master'
+##############################################
+connection master;
+SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
+VARIABLE_NAME GLOBAL_VALUE
+GTID_BINLOG_POS 0-1-6
+GTID_CURRENT_POS 0-1-6
+GTID_SLAVE_POS 0-2-5
+# First ensure gtid_slave_pos after master_demote_to_slave matches
+# gtid_current_pos calculation
+CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_use_gtid=slave_pos, master_demote_to_slave=1 ;
+SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
+VARIABLE_NAME GLOBAL_VALUE
+GTID_BINLOG_POS 0-1-6
+GTID_CURRENT_POS 0-1-6
+GTID_SLAVE_POS 0-1-6
+# Validating gtid_slave_pos == gtid_binlog_pos..
+# ..success
+connection slave;
+# Ensuring replication works correctly after role swap
+connection slave;
+set session gtid_domain_id= 0;
+CREATE TABLE repl_t (a int);
+INSERT INTO repl_t VALUES (1);
+connection master;
+# Validating that replication works..
+# ..success
+# Cleaning up replication check data
+connection slave;
+DROP TABLE repl_t;
+connection master;
+SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
+VARIABLE_NAME GLOBAL_VALUE
+GTID_BINLOG_POS 0-1-6
+GTID_CURRENT_POS 0-2-9
+GTID_SLAVE_POS 0-2-9
+##############################################
+# Connection semantics change:
+# * True primary is back to connection 'master'
+# * True replica is back to connection 'slave'
+##############################################
+connection master;
+connection slave;
+CHANGE MASTER TO master_host='127.0.0.1', master_port=MASTER_PORT, master_user='root', master_use_gtid=slave_pos, master_demote_to_slave=1;
+#
+# Test Case 4: If gtid_slave_pos and gtid_binlog_pos are equivalent,
+# MASTER_DEMOTE_TO_SLAVE=1 will not change gtid_slave_pos.
+#
+connection master;
+# update gtid_binlog_pos and demote it (we have proven this works)
+INSERT INTO t1 VALUES (3);
+# Update to account for statements to verify replication in include file
+CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_use_gtid=slave_pos, master_demote_to_slave=1;
+RESET SLAVE ALL;
+include/save_master_gtid.inc
+connection slave;
+include/sync_with_master_gtid.inc
+include/rpl_change_master_demote.inc
+##############################################
+# Connection semantics change:
+# * True primary is now connection 'slave'
+# * True replica is now connection 'master'
+##############################################
+connection master;
+SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
+VARIABLE_NAME GLOBAL_VALUE
+GTID_BINLOG_POS 0-1-10
+GTID_CURRENT_POS 0-1-10
+GTID_SLAVE_POS 0-1-10
+# First ensure gtid_slave_pos after master_demote_to_slave matches
+# gtid_current_pos calculation
+CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_use_gtid=slave_pos, master_demote_to_slave=1 ;
+SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
+VARIABLE_NAME GLOBAL_VALUE
+GTID_BINLOG_POS 0-1-10
+GTID_CURRENT_POS 0-1-10
+GTID_SLAVE_POS 0-1-10
+# Validating gtid_slave_pos == gtid_binlog_pos..
+# ..success
+connection slave;
+# Ensuring replication works correctly after role swap
+connection slave;
+set session gtid_domain_id= 0;
+CREATE TABLE repl_t (a int);
+INSERT INTO repl_t VALUES (1);
+connection master;
+# Validating that replication works..
+# ..success
+# Cleaning up replication check data
+connection slave;
+DROP TABLE repl_t;
+connection master;
+SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
+VARIABLE_NAME GLOBAL_VALUE
+GTID_BINLOG_POS 0-1-10
+GTID_CURRENT_POS 0-2-13
+GTID_SLAVE_POS 0-2-13
+##############################################
+# Connection semantics change:
+# * True primary is back to connection 'master'
+# * True replica is back to connection 'slave'
+##############################################
+connection master;
+connection slave;
+CHANGE MASTER TO master_host='127.0.0.1', master_port=MASTER_PORT, master_user='root', master_use_gtid=slave_pos, master_demote_to_slave=1;
+#
+# Test Case 5: If a new domain id is added into gtid_binlog_pos while
+# gtid_slave_pos already has a state, MASTER_DEMOTE_TO_SLAVE=1 will
+# append a new GTID to gtid_slave_pos with the latest seq_no from that
+# domain.
+#
+connection master;
+# Domain_id
+set session gtid_domain_id= 0;
+INSERT INTO t1 VALUES (4);
+set session gtid_domain_id= 1;
+CREATE TABLE t2 (a int);
+INSERT INTO t2 VALUES (1);
+include/save_master_gtid.inc
+connection slave;
+include/sync_with_master_gtid.inc
+include/rpl_change_master_demote.inc
+##############################################
+# Connection semantics change:
+# * True primary is now connection 'slave'
+# * True replica is now connection 'master'
+##############################################
+connection master;
+SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
+VARIABLE_NAME GLOBAL_VALUE
+GTID_BINLOG_POS 0-1-14,1-1-2
+GTID_CURRENT_POS 0-1-14,1-1-2
+GTID_SLAVE_POS 0-2-13
+# First ensure gtid_slave_pos after master_demote_to_slave matches
+# gtid_current_pos calculation
+CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_use_gtid=slave_pos, master_demote_to_slave=1 ;
+SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
+VARIABLE_NAME GLOBAL_VALUE
+GTID_BINLOG_POS 0-1-14,1-1-2
+GTID_CURRENT_POS 0-1-14,1-1-2
+GTID_SLAVE_POS 0-1-14,1-1-2
+# Validating gtid_slave_pos == gtid_binlog_pos..
+# ..success
+connection slave;
+# Ensuring replication works correctly after role swap
+connection slave;
+set session gtid_domain_id= 0;
+CREATE TABLE repl_t (a int);
+INSERT INTO repl_t VALUES (1);
+connection master;
+# Validating that replication works..
+# ..success
+# Cleaning up replication check data
+connection slave;
+DROP TABLE repl_t;
+connection master;
+SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
+VARIABLE_NAME GLOBAL_VALUE
+GTID_BINLOG_POS 0-1-14,1-1-2
+GTID_CURRENT_POS 0-2-17,1-1-2
+GTID_SLAVE_POS 0-2-17,1-1-2
+##############################################
+# Connection semantics change:
+# * True primary is back to connection 'master'
+# * True replica is back to connection 'slave'
+##############################################
+connection master;
+connection slave;
+CHANGE MASTER TO master_host='127.0.0.1', master_port=MASTER_PORT, master_user='root', master_use_gtid=slave_pos, master_demote_to_slave=1;
+#
+# Test Case 6: If gtid_slave_pos has multiple GTID positions and
+# gtid_binlog_pos contains updates on existing domain ids, new
+# domains, and differing server_ids, MASTER_DEMOTE_TO_SLAVE=1 will
+# update gtid_slave_pos such that it will have the seq_nos only from
+# the GTIDs last applied by this server. In other words, any GTIDs
+# with server ids that don't match that of the demoting server will be
+# ignored in the update.
+#
+connection master;
+# Update to account for statements to verify replication in include file
+set session gtid_domain_id= 0;
+INSERT INTO t1 VALUES (5);
+CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_use_gtid=slave_pos, master_demote_to_slave=1;
+RESET SLAVE ALL;
+set session gtid_domain_id= 1;
+INSERT INTO t2 VALUES (2);
+set session gtid_domain_id= 2;
+CREATE TABLE t3 (a int);
+INSERT INTO t3 VALUES (1);
+# The following events have a different server_id and should not go into
+# gtid_slave_pos
+set @old_server_id = @@server_id;
+set session gtid_domain_id= 1;
+set session server_id= 3;
+INSERT INTO t2 VALUES (3);
+set session gtid_domain_id= 4;
+set session server_id= 3;
+CREATE TABLE t5 (a int);
+INSERT INTO t5 VALUES (1);
+set session server_id= @old_server_id;
+include/save_master_gtid.inc
+connection slave;
+include/sync_with_master_gtid.inc
+include/rpl_change_master_demote.inc
+##############################################
+# Connection semantics change:
+# * True primary is now connection 'slave'
+# * True replica is now connection 'master'
+##############################################
+connection master;
+SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
+VARIABLE_NAME GLOBAL_VALUE
+GTID_BINLOG_POS 0-1-18,1-3-4,2-1-2,4-3-2
+GTID_CURRENT_POS 0-1-18,1-1-2,2-1-2
+GTID_SLAVE_POS 0-1-18,1-1-2
+# First ensure gtid_slave_pos after master_demote_to_slave matches
+# gtid_current_pos calculation
+CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_use_gtid=slave_pos, master_demote_to_slave=1 ;
+SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
+VARIABLE_NAME GLOBAL_VALUE
+GTID_BINLOG_POS 0-1-18,1-3-4,2-1-2,4-3-2
+GTID_CURRENT_POS 0-1-18,1-1-2,2-1-2
+GTID_SLAVE_POS 0-1-18,1-1-2,2-1-2
+# Validating gtid_slave_pos == gtid_binlog_pos..
+# ..success
+connection slave;
+# Ensuring replication works correctly after role swap
+connection slave;
+set session gtid_domain_id= 0;
+CREATE TABLE repl_t (a int);
+INSERT INTO repl_t VALUES (1);
+connection master;
+# Validating that replication works..
+# ..success
+# Cleaning up replication check data
+connection slave;
+DROP TABLE repl_t;
+connection master;
+SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
+VARIABLE_NAME GLOBAL_VALUE
+GTID_BINLOG_POS 0-1-18,1-3-4,2-1-2,4-3-2
+GTID_CURRENT_POS 0-2-21,1-3-4,2-1-2,4-3-2
+GTID_SLAVE_POS 0-2-21,1-3-4,2-1-2,4-3-2
+##############################################
+# Connection semantics change:
+# * True primary is back to connection 'master'
+# * True replica is back to connection 'slave'
+##############################################
+connection master;
+connection slave;
+CHANGE MASTER TO master_host='127.0.0.1', master_port=MASTER_PORT, master_user='root', master_use_gtid=slave_pos, master_demote_to_slave=1;
+#
+# Test Case 7: If MASTER_DEMOTE_TO_SLAVE=1 is combined with
+# IGNORE_DOMAIN_IDS such that gtid_binlog_pos has more recent GTIDs
+# than gtid_slave_pos in ignored domains, the CHANGE MASTER TO command
+# will still update gtid_slave_pos with the most recent transactions
+# from gtid_binlog_pos, despite being ignored by CHANGE MASTER TO
+# because they were already applied on the server.
+#
+connection master;
+set session gtid_domain_id= 2;
+INSERT INTO t3 VALUES (2);
+set session gtid_domain_id= 3;
+CREATE TABLE t4 (a int);
+INSERT INTO t4 VALUES (1);
+include/save_master_gtid.inc
+connection slave;
+include/sync_with_master_gtid.inc
+include/rpl_change_master_demote.inc
+##############################################
+# Connection semantics change:
+# * True primary is now connection 'slave'
+# * True replica is now connection 'master'
+##############################################
+connection master;
+SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
+VARIABLE_NAME GLOBAL_VALUE
+GTID_BINLOG_POS 0-1-18,1-3-4,2-1-3,3-1-2,4-3-2
+GTID_CURRENT_POS 0-2-21,1-3-4,2-1-3,3-1-2,4-3-2
+GTID_SLAVE_POS 0-2-21,1-3-4,2-1-2,4-3-2
+# First ensure gtid_slave_pos after master_demote_to_slave matches
+# gtid_current_pos calculation
+CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_use_gtid=slave_pos, master_demote_to_slave=1 , ignore_domain_ids=(2,3);
+SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
+VARIABLE_NAME GLOBAL_VALUE
+GTID_BINLOG_POS 0-1-18,1-3-4,2-1-3,3-1-2,4-3-2
+GTID_CURRENT_POS 0-2-21,1-3-4,2-1-3,3-1-2,4-3-2
+GTID_SLAVE_POS 0-2-21,1-3-4,2-1-3,3-1-2,4-3-2
+# Validating gtid_slave_pos == gtid_binlog_pos..
+# ..success
+connection slave;
+# Ensuring replication works correctly after role swap
+connection slave;
+set session gtid_domain_id= 0;
+CREATE TABLE repl_t (a int);
+INSERT INTO repl_t VALUES (1);
+connection master;
+# Validating that replication works..
+# ..success
+# Cleaning up replication check data
+connection slave;
+DROP TABLE repl_t;
+connection master;
+SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
+VARIABLE_NAME GLOBAL_VALUE
+GTID_BINLOG_POS 0-1-18,1-3-4,2-1-3,3-1-2,4-3-2
+GTID_CURRENT_POS 0-2-24,1-3-4,2-1-3,3-1-2,4-3-2
+GTID_SLAVE_POS 0-2-24,1-3-4,2-1-3,3-1-2,4-3-2
+##############################################
+# Connection semantics change:
+# * True primary is back to connection 'master'
+# * True replica is back to connection 'slave'
+##############################################
+connection master;
+connection slave;
+CHANGE MASTER TO master_host='127.0.0.1', master_port=MASTER_PORT, master_user='root', master_use_gtid=slave_pos, master_demote_to_slave=1;
+#
+# Test Case 8: If gtid_binlog_pos is more recent than gtid_slave_pos,
+# and MASTER_DEMOTE_TO_SLAVE=1 is combined with a later call to
+# START SLAVE UNTIL master_gtid_pos=<G> such that
+# gtid_slave_pos < G < gtid_binlog_pos, then the slave should stop
+# immediately after SSU because gtid_slave_pos should be updated to be
+# after G.
+#
+connection master;
+set session gtid_domain_id= 0;
+INSERT INTO t1 VALUES (6);
+# Tagging ssu_middle_binlog_pos here to be used for START SLAVE UNTIL
+INSERT INTO t1 VALUES (7);
+include/save_master_gtid.inc
+# Ensure slave is up-to-date with master and then disable slave status
+connection slave;
+include/sync_with_master_gtid.inc
+include/stop_slave.inc
+connection master;
+SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' ORDER BY VARIABLE_NAME ASC;
+VARIABLE_NAME GLOBAL_VALUE
+GTID_BINLOG_POS 0-1-26,1-3-4,2-1-3,3-1-2,4-3-2
+GTID_SLAVE_POS 0-2-24,1-3-4,2-1-3,3-1-2,4-3-2
+CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_use_gtid=Slave_Pos, master_demote_to_slave=1;
+SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' ORDER BY VARIABLE_NAME ASC;
+VARIABLE_NAME GLOBAL_VALUE
+GTID_BINLOG_POS 0-1-26,1-3-4,2-1-3,3-1-2,4-3-2
+GTID_SLAVE_POS 0-1-26,1-3-4,2-1-3,3-1-2,4-3-2
+# GTID ssu_middle_binlog_pos should be considered in the past because
+# gtid_slave_pos should be updated using the latest binlog gtids.
+# The following call to sync_with_master_gtid.inc uses the latest
+# binlog position and should still succeed despite the SSU stop
+# position pointing to a previous event (because
+# master_demote_to_slave=1 merges gtid_binlog_pos into gtid_slave_pos).
+START SLAVE UNTIL master_gtid_pos="ssu_middle_binlog_pos";
+Warnings:
+Note 1278 It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mariadbd restart
+# Slave needs time to start and stop automatically
+# Validating neither SQL nor IO threads are running..
+# ..success
+# Clean slave state of master
+RESET SLAVE ALL;
+#
+# Test Case 9: If gtid_slave_pos is more recent than gtid_binlog_pos
+# when demoting the master to become a slave, the replication state
+# should be preserved.
+#
+# rpl_change_master_demote.inc should force
+# gtid_slave_pos > gtid_binlog_pos in domain 0 (due to the step which
+# validates replication works)
+connection master;
+include/rpl_change_master_demote.inc
+##############################################
+# Connection semantics change:
+# * True primary is now connection 'slave'
+# * True replica is now connection 'master'
+##############################################
+connection master;
+SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
+VARIABLE_NAME GLOBAL_VALUE
+GTID_BINLOG_POS 0-1-26,1-3-4,2-1-3,3-1-2,4-3-2
+GTID_CURRENT_POS 0-1-26,1-3-4,2-1-3,3-1-2,4-3-2
+GTID_SLAVE_POS 0-1-26,1-3-4,2-1-3,3-1-2,4-3-2
+# First ensure gtid_slave_pos after master_demote_to_slave matches
+# gtid_current_pos calculation
+CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_use_gtid=slave_pos, master_demote_to_slave=1 , ignore_domain_ids=(2,3);
+SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
+VARIABLE_NAME GLOBAL_VALUE
+GTID_BINLOG_POS 0-1-26,1-3-4,2-1-3,3-1-2,4-3-2
+GTID_CURRENT_POS 0-1-26,1-3-4,2-1-3,3-1-2,4-3-2
+GTID_SLAVE_POS 0-1-26,1-3-4,2-1-3,3-1-2,4-3-2
+# Validating gtid_slave_pos == gtid_binlog_pos..
+# ..success
+connection slave;
+Warnings:
+Note 1255 Slave already has been stopped
+# Ensuring replication works correctly after role swap
+connection slave;
+set session gtid_domain_id= 0;
+CREATE TABLE repl_t (a int);
+INSERT INTO repl_t VALUES (1);
+connection master;
+# Validating that replication works..
+# ..success
+# Cleaning up replication check data
+connection slave;
+DROP TABLE repl_t;
+connection master;
+SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
+VARIABLE_NAME GLOBAL_VALUE
+GTID_BINLOG_POS 0-1-26,1-3-4,2-1-3,3-1-2,4-3-2
+GTID_CURRENT_POS 0-2-29,1-3-4,2-1-3,3-1-2,4-3-2
+GTID_SLAVE_POS 0-2-29,1-3-4,2-1-3,3-1-2,4-3-2
+##############################################
+# Connection semantics change:
+# * True primary is back to connection 'master'
+# * True replica is back to connection 'slave'
+##############################################
+connection master;
+connection slave;
+CHANGE MASTER TO master_host='127.0.0.1', master_port=MASTER_PORT, master_user='root', master_use_gtid=slave_pos, master_demote_to_slave=1;
+# Demote master to slave with the more recent gtid_slave_pos
+connection master;
+CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_use_gtid=slave_pos, master_demote_to_slave=1;
+# Validating gtid_slave_pos is unchanged..
+# ..success
+# Validating gtid_slave_pos == gtid_binlog_pos..
+# ..success
+# Clean slave state of master
+RESET SLAVE ALL;
+#
+# Test Case 10: MASTER_DEMOTE_TO_SLAVE=0 should not change replication
+# state, regardless of gtid_slave_pos in comparison to gtid_binlog_pos.
+#
+# In domain 0, make gtid_slave_pos > gtid_binlog_pos
+connection master;
+include/rpl_change_master_demote.inc
+##############################################
+# Connection semantics change:
+# * True primary is now connection 'slave'
+# * True replica is now connection 'master'
+##############################################
+connection master;
+SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
+VARIABLE_NAME GLOBAL_VALUE
+GTID_BINLOG_POS 0-1-26,1-3-4,2-1-3,3-1-2,4-3-2
+GTID_CURRENT_POS 0-2-29,1-3-4,2-1-3,3-1-2,4-3-2
+GTID_SLAVE_POS 0-2-29,1-3-4,2-1-3,3-1-2,4-3-2
+# First ensure gtid_slave_pos after master_demote_to_slave matches
+# gtid_current_pos calculation
+CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_use_gtid=slave_pos, master_demote_to_slave=1 , ignore_domain_ids=(2,3);
+SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
+VARIABLE_NAME GLOBAL_VALUE
+GTID_BINLOG_POS 0-1-26,1-3-4,2-1-3,3-1-2,4-3-2
+GTID_CURRENT_POS 0-2-29,1-3-4,2-1-3,3-1-2,4-3-2
+GTID_SLAVE_POS 0-2-29,1-3-4,2-1-3,3-1-2,4-3-2
+# Validating gtid_slave_pos == gtid_binlog_pos..
+# ..success
+connection slave;
+# Ensuring replication works correctly after role swap
+connection slave;
+set session gtid_domain_id= 0;
+CREATE TABLE repl_t (a int);
+INSERT INTO repl_t VALUES (1);
+connection master;
+# Validating that replication works..
+# ..success
+# Cleaning up replication check data
+connection slave;
+DROP TABLE repl_t;
+connection master;
+SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
+VARIABLE_NAME GLOBAL_VALUE
+GTID_BINLOG_POS 0-1-26,1-3-4,2-1-3,3-1-2,4-3-2
+GTID_CURRENT_POS 0-2-32,1-3-4,2-1-3,3-1-2,4-3-2
+GTID_SLAVE_POS 0-2-32,1-3-4,2-1-3,3-1-2,4-3-2
+##############################################
+# Connection semantics change:
+# * True primary is back to connection 'master'
+# * True replica is back to connection 'slave'
+##############################################
+connection master;
+connection slave;
+CHANGE MASTER TO master_host='127.0.0.1', master_port=MASTER_PORT, master_user='root', master_use_gtid=slave_pos, master_demote_to_slave=1;
+# Tag gtid_slave_pos now (before binlog updates) for later comparison
+connection master;
+# In domain 1, make gtid_slave_pos < gtid_binlog_pos
+set session gtid_domain_id= 1;
+INSERT INTO t2 VALUES (4);
+# In domains 2, 3 and 4, gtid_slave_pos == gtid_binlog_pos
+# Include a new domain id (5)
+set session gtid_domain_id= 5;
+CREATE TABLE t6 (a int);
+INSERT INTO t6 VALUES (1);
+SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' ORDER BY VARIABLE_NAME ASC;
+VARIABLE_NAME GLOBAL_VALUE
+GTID_BINLOG_POS 0-1-26,1-1-5,2-1-3,3-1-2,4-3-2,5-1-2
+GTID_SLAVE_POS 0-2-32,1-3-4,2-1-3,3-1-2,4-3-2
+CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_use_gtid=slave_pos, master_demote_to_slave=0;
+# Validating gtid_slave_pos is unchanged..
+# ..success
+# Clean slave state of master
+CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_use_gtid=slave_pos, master_demote_to_slave=1;
+RESET SLAVE ALL;
+SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' ORDER BY VARIABLE_NAME ASC;
+VARIABLE_NAME GLOBAL_VALUE
+GTID_BINLOG_POS 0-1-26,1-1-5,2-1-3,3-1-2,4-3-2,5-1-2
+GTID_SLAVE_POS 0-2-32,1-1-5,2-1-3,3-1-2,4-3-2,5-1-2
+#
+#
+# Stop slave for error test cases
+connection slave;
+include/stop_slave.inc
+#
+# Error Case 1: MASTER_DEMOTE_TO_SLAVE=1 combined with
+# MASTER_USE_GTID=NO should result in an error.
+#
+connection master;
+CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_use_gtid=no, master_demote_to_slave=1;
+ERROR HY000: CHANGE MASTER TO option 'MASTER_DEMOTE_TO_SLAVE=TRUE' is missing requirement Using_Gtid=Slave_Pos
+#
+# Error Case 2: Error when MASTER_DEMOTE_TO_SLAVE=1 is used without
+# binary logging enabled.
+#
+connection master;
+# Restarting master without binary log
+CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_use_gtid=Slave_Pos, master_demote_to_slave=1;
+ERROR HY000: You are not using binary logging
+# Restarting master to re-enable binary log
+connection server_1;
+connection default;
+#
+# Error Case 3: Error when MASTER_DEMOTE_TO_SLAVE is provided a
+# non-boolean value.
+#
+connection master;
+CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_use_gtid=Slave_Pos, master_demote_to_slave=invalid;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'invalid' at line 1
+#
+# Cleanup
+#
+connection master;
+DROP TABLE t1, t2, t3, t4, t5, t6;
+include/save_master_gtid.inc
+connection slave;
+include/start_slave.inc
+include/sync_with_master_gtid.inc
+include/rpl_end.inc
+#
+### End rpl_change_master_demote.test
diff --git a/mysql-test/suite/rpl/r/rpl_checksum.result b/mysql-test/suite/rpl/r/rpl_checksum.result
index 21d8ca22feb..7ade3067eae 100644
--- a/mysql-test/suite/rpl/r/rpl_checksum.result
+++ b/mysql-test/suite/rpl/r/rpl_checksum.result
@@ -1,5 +1,10 @@
include/master-slave.inc
[connection master]
+connection slave;
+include/stop_slave.inc
+CHANGE MASTER TO MASTER_USE_GTID=NO;
+include/start_slave.inc
+connection master;
call mtr.add_suppression('Slave can not handle replication events with the checksum that master is configured to log');
call mtr.add_suppression('Replication event checksum verification failed');
call mtr.add_suppression('Relay log write failure: could not queue event from master');
@@ -122,7 +127,9 @@ must be zero
0
connection slave;
stop slave;
-reset slave;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
set @@global.binlog_checksum= IF(floor((rand()*1000)%2), "CRC32", "NONE");
flush logs;
connection master;
diff --git a/mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result b/mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result
index 4ec1e2512d2..85cc0cc7ebc 100644
--- a/mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result
+++ b/mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result
@@ -184,6 +184,8 @@ connection server_3;
RESET MASTER;
connection server_4;
RESET SLAVE;
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
include/rpl_change_topology.inc [new topology=1->2->3->4->1]
include/start_slave.inc
connection server_3;
diff --git a/mysql-test/suite/rpl/r/rpl_colSize.result b/mysql-test/suite/rpl/r/rpl_colSize.result
index 5d72ddcec09..95a30c6ee4d 100644
--- a/mysql-test/suite/rpl/r/rpl_colSize.result
+++ b/mysql-test/suite/rpl/r/rpl_colSize.result
@@ -6,7 +6,7 @@ DROP TABLE IF EXISTS t1;
connection slave;
STOP SLAVE;
include/wait_for_slave_to_stop.inc
-RESET SLAVE;
+include/reset_slave.inc
SET @saved_slave_type_conversions = @@slave_type_conversions;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';
CREATE TABLE t1 (
diff --git a/mysql-test/suite/rpl/r/rpl_corruption.result b/mysql-test/suite/rpl/r/rpl_corruption.result
index 73bb373d6be..7c60e15a567 100644
--- a/mysql-test/suite/rpl/r/rpl_corruption.result
+++ b/mysql-test/suite/rpl/r/rpl_corruption.result
@@ -1,5 +1,10 @@
include/master-slave.inc
[connection master]
+connection slave;
+include/stop_slave.inc
+CHANGE MASTER TO MASTER_USE_GTID=NO;
+include/start_slave.inc
+connection master;
call mtr.add_suppression('Found invalid event in binary log');
call mtr.add_suppression('Slave I/O: Relay log write failure: could not queue event from master');
call mtr.add_suppression('event read from binlog did not pass crc check');
diff --git a/mysql-test/suite/rpl/r/rpl_cross_version.result b/mysql-test/suite/rpl/r/rpl_cross_version.result
index b94b02a24ff..1b67542c106 100644
--- a/mysql-test/suite/rpl/r/rpl_cross_version.result
+++ b/mysql-test/suite/rpl/r/rpl_cross_version.result
@@ -16,5 +16,7 @@ zero
==== Clean up ====
include/stop_slave_sql.inc
include/cleanup_fake_relay_log.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
drop table t1, t3;
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result b/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result
index 491b27252b4..16b00cee123 100644
--- a/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result
@@ -63,7 +63,7 @@ include/check_slave_is_running.inc
connection slave;
include/stop_slave.inc
DELETE FROM t2;
-CHANGE MASTER TO MASTER_LOG_POS=<master_pos_begin>;
+CHANGE MASTER TO MASTER_LOG_POS=<master_pos_begin>, MASTER_USE_GTID=NO;
BEGIN;
SELECT * FROM t1 FOR UPDATE;
a
@@ -95,7 +95,7 @@ Warnings:
Warning 1292 Truncated incorrect max_relay_log_size value: '0'
include/stop_slave.inc
DELETE FROM t2;
-CHANGE MASTER TO MASTER_LOG_POS=<master_pos_begin>;
+CHANGE MASTER TO MASTER_LOG_POS=<master_pos_begin>, MASTER_USE_GTID=NO;
BEGIN;
SELECT * FROM t1 FOR UPDATE;
a
diff --git a/mysql-test/suite/rpl/r/rpl_delayed_slave.result b/mysql-test/suite/rpl/r/rpl_delayed_slave.result
index e7daa3328ce..c8c3bc36485 100644
--- a/mysql-test/suite/rpl/r/rpl_delayed_slave.result
+++ b/mysql-test/suite/rpl/r/rpl_delayed_slave.result
@@ -3,6 +3,9 @@ include/master-slave.inc
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");
+include/stop_slave.inc
+CHANGE MASTER TO MASTER_USE_GTID=NO;
+include/start_slave.inc
connection master;
[on master]
CREATE TABLE t1 (a VARCHAR(100), b INT);
@@ -153,7 +156,9 @@ CHANGE MASTER TO MASTER_DELAY = 71;
include/start_slave.inc
# Asserted this: Delay should be 71 when we set it to 71
include/stop_slave.inc
-RESET SLAVE;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
[on master]
connection master;
RESET MASTER;
diff --git a/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result b/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result
index 5865b75550f..be98b7e3dcd 100644
--- a/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result
@@ -437,7 +437,7 @@ connection master;
** Stop and Reset Slave **
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
** create table slave side **
CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5)
@@ -482,7 +482,7 @@ connection slave;
*** Create t11 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254)
) ENGINE='InnoDB';
@@ -524,7 +524,7 @@ connection slave;
*** Create t12 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB
) ENGINE='InnoDB';
@@ -573,7 +573,7 @@ connection slave;
*** Create t14 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='InnoDB';
@@ -638,7 +638,7 @@ connection slave;
include/wait_for_slave_sql_error.inc [errno=1091]
Last_SQL_Error = 'Error 'Can't DROP COLUMN `c7`; check that it exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7''
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
*** Drop t14 ***
DROP TABLE t14;
@@ -655,7 +655,9 @@ START SLAVE;
*** Create t15 on slave ***
STOP SLAVE;
-RESET 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
CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='InnoDB';
@@ -693,7 +695,9 @@ connection slave;
include/wait_for_slave_sql_error.inc [errno=1054]
Last_SQL_Error = 'Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7''
STOP SLAVE;
-RESET 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
*** Drop t15 ***
DROP TABLE t15;
@@ -710,7 +714,9 @@ START SLAVE;
*** Create t16 on slave ***
STOP SLAVE;
-RESET 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
CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='InnoDB';
@@ -748,7 +754,9 @@ connection slave;
include/wait_for_slave_sql_error.inc [errno=1072]
Last_SQL_Error = 'Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)''
STOP SLAVE;
-RESET 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
*** Drop t16 ***
DROP TABLE t16;
@@ -765,7 +773,9 @@ START SLAVE;
*** Create t17 on slave ***
STOP SLAVE;
-RESET 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
CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='InnoDB';
@@ -831,7 +841,7 @@ connection slave;
*** Create t18 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t18 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='InnoDB';
@@ -896,7 +906,7 @@ connection slave;
*** Create t5 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t5 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='InnoDB';
diff --git a/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result b/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result
index f47d79b5b86..53b20b188ba 100644
--- a/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result
+++ b/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result
@@ -437,7 +437,7 @@ connection master;
** Stop and Reset Slave **
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
** create table slave side **
CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5)
@@ -482,7 +482,7 @@ connection slave;
*** Create t11 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254)
) ENGINE='MyISAM';
@@ -524,7 +524,7 @@ connection slave;
*** Create t12 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB
) ENGINE='MyISAM';
@@ -573,7 +573,7 @@ connection slave;
*** Create t14 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='MyISAM';
@@ -638,7 +638,7 @@ connection slave;
include/wait_for_slave_sql_error.inc [errno=1091]
Last_SQL_Error = 'Error 'Can't DROP COLUMN `c7`; check that it exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7''
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
*** Drop t14 ***
DROP TABLE t14;
@@ -655,7 +655,9 @@ START SLAVE;
*** Create t15 on slave ***
STOP SLAVE;
-RESET 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
CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='MyISAM';
@@ -693,7 +695,9 @@ connection slave;
include/wait_for_slave_sql_error.inc [errno=1054]
Last_SQL_Error = 'Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7''
STOP SLAVE;
-RESET 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
*** Drop t15 ***
DROP TABLE t15;
@@ -710,7 +714,9 @@ START SLAVE;
*** Create t16 on slave ***
STOP SLAVE;
-RESET 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
CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='MyISAM';
@@ -748,7 +754,9 @@ connection slave;
include/wait_for_slave_sql_error.inc [errno=1072]
Last_SQL_Error = 'Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)''
STOP SLAVE;
-RESET 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
*** Drop t16 ***
DROP TABLE t16;
@@ -765,7 +773,9 @@ START SLAVE;
*** Create t17 on slave ***
STOP SLAVE;
-RESET 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
CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='MyISAM';
@@ -831,7 +841,7 @@ connection slave;
*** Create t18 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t18 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='MyISAM';
@@ -896,7 +906,7 @@ connection slave;
*** Create t5 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t5 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='MyISAM';
diff --git a/mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result b/mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result
index 13077c08e89..ea784e7fc21 100644
--- a/mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result
@@ -5,7 +5,7 @@ call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]*. cannot
**** Diff Table Def Start ****
connection slave;
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
SET @saved_slave_type_conversions = @@slave_type_conversions;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';
CREATE TABLE t1 (a INT, b INT PRIMARY KEY, c CHAR(20),
@@ -42,7 +42,7 @@ DROP TABLE t1;
connection slave;
*** Create t2 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t2 (a INT, b INT PRIMARY KEY, c CHAR(5),
d FLOAT DEFAULT '2.00',
e CHAR(5) DEFAULT 'TEST2')
@@ -66,7 +66,9 @@ START SLAVE;
include/wait_for_slave_sql_error.inc [errno=1677]
Last_SQL_Error = 'Column 2 of table 'test.t2' cannot be converted from type 'char(10 octets)' to type 'char(5 octets) character set latin1''
STOP SLAVE;
-RESET 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-4. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
SELECT * FROM t2 ORDER BY a;
a b c d e
connection master;
@@ -79,7 +81,7 @@ DROP TABLE t2;
connection slave;
*** Create t3 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t3 (a INT, b INT PRIMARY KEY, c CHAR(20),
d FLOAT DEFAULT '2.00',
e CHAR(5) DEFAULT 'TEST2')
@@ -109,7 +111,7 @@ DROP TABLE t3;
connection slave;
*** Create t4 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t4 (a INT, b INT PRIMARY KEY, c CHAR(20),
d FLOAT DEFAULT '2.00',
e CHAR(5) DEFAULT 'TEST2')
@@ -138,7 +140,7 @@ DROP TABLE t4;
connection slave;
*** Create t5 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t5 (a INT PRIMARY KEY, b CHAR(5),
c FLOAT, d INT, e DOUBLE,
f DECIMAL(8,2))ENGINE='InnoDB';
@@ -167,7 +169,7 @@ DROP TABLE t5;
connection slave;
*** Create t6 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t6 (a INT PRIMARY KEY, b CHAR(5),
c FLOAT, d INT)ENGINE='InnoDB';
*** Create t6 on Master ***
@@ -198,7 +200,7 @@ connection slave;
**** Extra Colums Start ****
*** Create t7 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t7 (a INT KEY, b BLOB, c CHAR(5),
d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00',
e CHAR(20) DEFAULT 'Extra Column Testing')
@@ -234,7 +236,7 @@ DROP TABLE t7;
connection slave;
*** Create t8 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t8 (a INT KEY, b BLOB, c CHAR(5),
d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00',
e INT)ENGINE='InnoDB';
@@ -256,7 +258,7 @@ connection master;
DROP TABLE t8;
connection slave;
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t9 (a INT KEY, b BLOB, c CHAR(5),
d TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
ON UPDATE CURRENT_TIMESTAMP,
@@ -289,7 +291,7 @@ DROP TABLE t9;
connection slave;
*** Create t10 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233',
c CHAR(5), e INT DEFAULT '1')ENGINE='InnoDB';
*** Create t10 on Master ***
@@ -317,7 +319,7 @@ DROP TABLE t10;
connection slave;
*** Create t11 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t11 (a INT KEY, b BLOB, f INT,
c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='InnoDB';
*** Create t11 on Master ***
@@ -345,7 +347,7 @@ DROP TABLE t11;
connection slave;
*** Create t12 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT,
c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='InnoDB';
*** Create t12 on Master ***
@@ -381,7 +383,7 @@ connection slave;
*** BUG 22177 Start ***
*** Create t13 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t13 (a INT KEY, b BLOB, c CHAR(5),
d INT DEFAULT '1',
e TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
@@ -419,7 +421,7 @@ connection slave;
*** Alter Master Table Testing Start ***
*** Create t14 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1',
c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
@@ -455,7 +457,7 @@ c1 c2 c3 c4 c5 c6 c7
3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
*** Create t14a on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t14a (c1 INT KEY, c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1',
c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
@@ -488,7 +490,7 @@ c1 c4 c5 c6 c7
2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP
3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
*** Master Drop c5 ***
connection master;
ALTER TABLE t14a DROP COLUMN c5;
@@ -547,7 +549,7 @@ DROP TABLE t14;
connection slave;
*** Create t15 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t15 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT,
c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1',
@@ -615,7 +617,7 @@ DROP TABLE t15;
connection slave;
*** Create t16 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t16 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT,
c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1',
@@ -687,7 +689,7 @@ connection slave;
*** Alter Master End ***
*** Create t17 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t17 (a SMALLINT, b INT PRIMARY KEY, c CHAR(5),
d FLOAT DEFAULT '2.00',
e CHAR(5) DEFAULT 'TEST2')
diff --git a/mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result b/mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result
index 897a87db66f..8ad7e98798a 100644
--- a/mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result
+++ b/mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result
@@ -5,7 +5,7 @@ call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]*. cannot
**** Diff Table Def Start ****
connection slave;
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
SET @saved_slave_type_conversions = @@slave_type_conversions;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';
CREATE TABLE t1 (a INT, b INT PRIMARY KEY, c CHAR(20),
@@ -42,7 +42,7 @@ DROP TABLE t1;
connection slave;
*** Create t2 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t2 (a INT, b INT PRIMARY KEY, c CHAR(5),
d FLOAT DEFAULT '2.00',
e CHAR(5) DEFAULT 'TEST2')
@@ -66,7 +66,9 @@ START SLAVE;
include/wait_for_slave_sql_error.inc [errno=1677]
Last_SQL_Error = 'Column 2 of table 'test.t2' cannot be converted from type 'char(10 octets)' to type 'char(5 octets) character set latin1''
STOP SLAVE;
-RESET 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-4. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
SELECT * FROM t2 ORDER BY a;
a b c d e
connection master;
@@ -79,7 +81,7 @@ DROP TABLE t2;
connection slave;
*** Create t3 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t3 (a INT, b INT PRIMARY KEY, c CHAR(20),
d FLOAT DEFAULT '2.00',
e CHAR(5) DEFAULT 'TEST2')
@@ -109,7 +111,7 @@ DROP TABLE t3;
connection slave;
*** Create t4 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t4 (a INT, b INT PRIMARY KEY, c CHAR(20),
d FLOAT DEFAULT '2.00',
e CHAR(5) DEFAULT 'TEST2')
@@ -138,7 +140,7 @@ DROP TABLE t4;
connection slave;
*** Create t5 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t5 (a INT PRIMARY KEY, b CHAR(5),
c FLOAT, d INT, e DOUBLE,
f DECIMAL(8,2))ENGINE='MyISAM';
@@ -167,7 +169,7 @@ DROP TABLE t5;
connection slave;
*** Create t6 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t6 (a INT PRIMARY KEY, b CHAR(5),
c FLOAT, d INT)ENGINE='MyISAM';
*** Create t6 on Master ***
@@ -198,7 +200,7 @@ connection slave;
**** Extra Colums Start ****
*** Create t7 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t7 (a INT KEY, b BLOB, c CHAR(5),
d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00',
e CHAR(20) DEFAULT 'Extra Column Testing')
@@ -234,7 +236,7 @@ DROP TABLE t7;
connection slave;
*** Create t8 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t8 (a INT KEY, b BLOB, c CHAR(5),
d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00',
e INT)ENGINE='MyISAM';
@@ -256,7 +258,7 @@ connection master;
DROP TABLE t8;
connection slave;
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t9 (a INT KEY, b BLOB, c CHAR(5),
d TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
ON UPDATE CURRENT_TIMESTAMP,
@@ -289,7 +291,7 @@ DROP TABLE t9;
connection slave;
*** Create t10 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233',
c CHAR(5), e INT DEFAULT '1')ENGINE='MyISAM';
*** Create t10 on Master ***
@@ -317,7 +319,7 @@ DROP TABLE t10;
connection slave;
*** Create t11 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t11 (a INT KEY, b BLOB, f INT,
c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='MyISAM';
*** Create t11 on Master ***
@@ -345,7 +347,7 @@ DROP TABLE t11;
connection slave;
*** Create t12 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT,
c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='MyISAM';
*** Create t12 on Master ***
@@ -381,7 +383,7 @@ connection slave;
*** BUG 22177 Start ***
*** Create t13 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t13 (a INT KEY, b BLOB, c CHAR(5),
d INT DEFAULT '1',
e TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
@@ -419,7 +421,7 @@ connection slave;
*** Alter Master Table Testing Start ***
*** Create t14 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1',
c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
@@ -455,7 +457,7 @@ c1 c2 c3 c4 c5 c6 c7
3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
*** Create t14a on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t14a (c1 INT KEY, c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1',
c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
@@ -488,7 +490,7 @@ c1 c4 c5 c6 c7
2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP
3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
*** Master Drop c5 ***
connection master;
ALTER TABLE t14a DROP COLUMN c5;
@@ -547,7 +549,7 @@ DROP TABLE t14;
connection slave;
*** Create t15 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t15 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT,
c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1',
@@ -615,7 +617,7 @@ DROP TABLE t15;
connection slave;
*** Create t16 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t16 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT,
c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1',
@@ -687,7 +689,7 @@ connection slave;
*** Alter Master End ***
*** Create t17 on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t17 (a SMALLINT, b INT PRIMARY KEY, c CHAR(5),
d FLOAT DEFAULT '2.00',
e CHAR(5) DEFAULT 'TEST2')
diff --git a/mysql-test/suite/rpl/r/rpl_gtid_basic.result b/mysql-test/suite/rpl/r/rpl_gtid_basic.result
index 32df09789cc..fc7505e144f 100644
--- a/mysql-test/suite/rpl/r/rpl_gtid_basic.result
+++ b/mysql-test/suite/rpl/r/rpl_gtid_basic.result
@@ -69,6 +69,8 @@ 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
@@ -89,6 +91,8 @@ 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;
@@ -117,6 +121,8 @@ 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;
diff --git a/mysql-test/suite/rpl/r/rpl_gtid_crash.result b/mysql-test/suite/rpl/r/rpl_gtid_crash.result
index 153081d9ca5..fc8e69af861 100644
--- a/mysql-test/suite/rpl/r/rpl_gtid_crash.result
+++ b/mysql-test/suite/rpl/r/rpl_gtid_crash.result
@@ -15,6 +15,8 @@ SET sql_log_bin=1;
include/stop_slave.inc
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
connection server_1;
INSERT INTO t1 VALUES (2,1);
INSERT INTO t1 VALUES (3,1);
diff --git a/mysql-test/suite/rpl/r/rpl_gtid_errorhandling.result b/mysql-test/suite/rpl/r/rpl_gtid_errorhandling.result
index 4c35d42d90a..a7cb710cc07 100644
--- a/mysql-test/suite/rpl/r/rpl_gtid_errorhandling.result
+++ b/mysql-test/suite/rpl/r/rpl_gtid_errorhandling.result
@@ -75,6 +75,8 @@ 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
diff --git a/mysql-test/suite/rpl/r/rpl_gtid_excess_initial_delay.result b/mysql-test/suite/rpl/r/rpl_gtid_excess_initial_delay.result
index 641d186ab78..302bf182ac2 100644
--- a/mysql-test/suite/rpl/r/rpl_gtid_excess_initial_delay.result
+++ b/mysql-test/suite/rpl/r/rpl_gtid_excess_initial_delay.result
@@ -4,6 +4,8 @@ CREATE TABLE t1 (i INT);
connection slave;
include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID= current_pos, MASTER_DELAY= 10;
+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 master;
INSERT INTO t1 VALUES (1);
diff --git a/mysql-test/suite/rpl/r/rpl_gtid_master_promote.result b/mysql-test/suite/rpl/r/rpl_gtid_master_promote.result
index 15bcb6621ff..19229a3c6c2 100644
--- a/mysql-test/suite/rpl/r/rpl_gtid_master_promote.result
+++ b/mysql-test/suite/rpl/r/rpl_gtid_master_promote.result
@@ -13,15 +13,23 @@ END|
connection server_2;
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
connection server_3;
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
connection server_4;
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
connection server_5;
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
connection server_1;
SET gtid_domain_id= 1;
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
@@ -340,6 +348,8 @@ a b
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
include/start_slave.inc
SELECT * FROM t1 ORDER BY a;
a
@@ -377,6 +387,8 @@ a b
connection server_1;
include/stop_slave.inc
RESET SLAVE ALL;
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'Current_Pos' to 'Slave_Pos'
connection server_2;
CHANGE MASTER TO master_host = '127.0.0.1', master_port = SERVER_MYPORT_1;
include/start_slave.inc
diff --git a/mysql-test/suite/rpl/r/rpl_gtid_mdev4473.result b/mysql-test/suite/rpl/r/rpl_gtid_mdev4473.result
index 5c80e64dc9b..e61df488d62 100644
--- a/mysql-test/suite/rpl/r/rpl_gtid_mdev4473.result
+++ b/mysql-test/suite/rpl/r/rpl_gtid_mdev4473.result
@@ -13,6 +13,8 @@ reset slave all;
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
include/start_slave.inc
include/wait_for_slave_to_start.inc
connection server_2;
@@ -23,6 +25,8 @@ flush logs;
connection server_3;
CHANGE MASTER TO master_host = '127.0.0.1', master_port = SERVER_MYPORT_2,
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 n;
n
@@ -53,14 +57,20 @@ connection server_1;
include/stop_slave.inc
include/wait_for_slave_to_stop.inc
reset slave all;
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'Current_Pos' to 'Slave_Pos'
connection server_2;
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
include/start_slave.inc
connection server_3;
include/stop_slave.inc
CHANGE MASTER TO master_host = '127.0.0.1', master_port = SERVER_MYPORT_1,
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_1;
drop table t1;
diff --git a/mysql-test/suite/rpl/r/rpl_gtid_mdev4820.result b/mysql-test/suite/rpl/r/rpl_gtid_mdev4820.result
index 606207c1d99..cea5aaaeacd 100644
--- a/mysql-test/suite/rpl/r/rpl_gtid_mdev4820.result
+++ b/mysql-test/suite/rpl/r/rpl_gtid_mdev4820.result
@@ -45,6 +45,8 @@ 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);
@@ -67,11 +69,15 @@ a
11
include/stop_slave.inc
RESET SLAVE ALL;
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'Current_Pos' to 'Slave_Pos'
INSERT INTO t1 VALUES (12);
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");
diff --git a/mysql-test/suite/rpl/r/rpl_gtid_mdev9033.result b/mysql-test/suite/rpl/r/rpl_gtid_mdev9033.result
index 9f0ad66bb83..2471f26bc04 100644
--- a/mysql-test/suite/rpl/r/rpl_gtid_mdev9033.result
+++ b/mysql-test/suite/rpl/r/rpl_gtid_mdev9033.result
@@ -58,8 +58,8 @@ connection server_3;
include/sync_with_master_gtid.inc
connection server_2;
STOP SLAVE;
-CHANGE MASTER TO MASTER_USE_GTID = NO, IGNORE_DOMAIN_IDS = ();
+CHANGE MASTER TO IGNORE_DOMAIN_IDS = ();
connection server_3;
STOP SLAVE;
-CHANGE MASTER TO MASTER_USE_GTID = NO, IGNORE_DOMAIN_IDS = ();
+CHANGE MASTER TO IGNORE_DOMAIN_IDS = ();
# End of test.
diff --git a/mysql-test/suite/rpl/r/rpl_gtid_misc.result b/mysql-test/suite/rpl/r/rpl_gtid_misc.result
index a5c61759ed6..ad77aa2350e 100644
--- a/mysql-test/suite/rpl/r/rpl_gtid_misc.result
+++ b/mysql-test/suite/rpl/r/rpl_gtid_misc.result
@@ -10,6 +10,8 @@ SET sql_log_bin= 0;
INSERT INTO t1 VALUES (1);
SET sql_log_bin= 1;
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
connection master;
CREATE TEMPORARY TABLE t2 LIKE t1;
INSERT INTO t2 VALUE (1);
diff --git a/mysql-test/suite/rpl/r/rpl_gtid_nobinlog.result b/mysql-test/suite/rpl/r/rpl_gtid_nobinlog.result
index c42348d40ee..de5f30696fe 100644
--- a/mysql-test/suite/rpl/r/rpl_gtid_nobinlog.result
+++ b/mysql-test/suite/rpl/r/rpl_gtid_nobinlog.result
@@ -22,6 +22,8 @@ include/stop_slave.inc
connection server_1;
CHANGE MASTER TO master_host = '127.0.0.1', master_port = SLAVE_PORT,
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;
include/wait_for_slave_to_start.inc
connection server_2;
@@ -46,12 +48,16 @@ a b
4 2
include/stop_slave.inc
RESET SLAVE;
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'Current_Pos' to 'Slave_Pos'
INSERT INTO t1 VALUES (5, 1);
INSERT INTO t1 VALUES (6, 1);
include/save_master_gtid.inc
connection server_2;
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
START SLAVE;
include/sync_with_master_gtid.inc
SELECT * FROM t1 ORDER BY a;
diff --git a/mysql-test/suite/rpl/r/rpl_gtid_reconnect.result b/mysql-test/suite/rpl/r/rpl_gtid_reconnect.result
index 4f50d7c6d85..6282e116733 100644
--- a/mysql-test/suite/rpl/r/rpl_gtid_reconnect.result
+++ b/mysql-test/suite/rpl/r/rpl_gtid_reconnect.result
@@ -2,6 +2,8 @@ include/rpl_init.inc [topology=1->2]
connection server_2;
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
connection server_1;
CREATE TABLE t1 (a INT);
diff --git a/mysql-test/suite/rpl/r/rpl_gtid_sort.result b/mysql-test/suite/rpl/r/rpl_gtid_sort.result
index 34c0fd32766..bb1fb28e0e9 100644
--- a/mysql-test/suite/rpl/r/rpl_gtid_sort.result
+++ b/mysql-test/suite/rpl/r/rpl_gtid_sort.result
@@ -59,6 +59,8 @@ Variable_name Value
gtid_binlog_state
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
SHOW VARIABLES LIKE 'gtid_binlog_pos';
Variable_name Value
diff --git a/mysql-test/suite/rpl/r/rpl_gtid_startpos.result b/mysql-test/suite/rpl/r/rpl_gtid_startpos.result
index 3c363004170..846854f8668 100644
--- a/mysql-test/suite/rpl/r/rpl_gtid_startpos.result
+++ b/mysql-test/suite/rpl/r/rpl_gtid_startpos.result
@@ -12,6 +12,8 @@ connection server_2;
SET GLOBAL gtid_slave_pos="";
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;
a
@@ -34,11 +36,13 @@ connection server_2;
SET GLOBAL gtid_slave_pos="";
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
START SLAVE;
include/wait_for_slave_io_error.inc [errno=1236]
include/stop_slave.inc
CHANGE MASTER TO master_host = '127.0.0.1', master_port = MASTER_PORT,
-MASTER_LOG_FILE="master-bin.000003", MASTER_LOG_POS=4;
+MASTER_LOG_FILE="master-bin.000003", MASTER_LOG_POS=4, MASTER_USE_GTID=NO;
include/start_slave.inc
SELECT * FROM t1 ORDER BY a;
a
@@ -56,6 +60,8 @@ connection server_2;
SET GLOBAL gtid_slave_pos='0-1-3';
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
include/sync_with_master_gtid.inc
SELECT * FROM t1 ORDER by a;
@@ -90,12 +96,16 @@ connection server_2;
connection server_2;
include/stop_slave.inc
RESET SLAVE ALL;
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'Current_Pos' to 'Slave_Pos'
RESET MASTER;
connection server_1;
RESET MASTER;
connection server_2;
SET GLOBAL gtid_slave_pos='';
CHANGE MASTER TO master_host='127.0.0.1', master_port=MASTER_PORT, 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
include/start_slave.inc
connection server_1;
CREATE TABLE t1 (a INT PRIMARY KEY);
@@ -119,6 +129,8 @@ connection server_2;
include/stop_slave.inc
DROP TABLE t1;
RESET SLAVE;
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'Current_Pos' to 'Slave_Pos'
SET GLOBAL gtid_slave_pos="";
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-4. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
@@ -145,12 +157,14 @@ a
2
*** Test that RESET SLAVE clears the Using_Gtid flag. ***
include/stop_slave.inc
-RESET SLAVE;
+include/reset_slave.inc
Using_Gtid = 'No'
START SLAVE;
include/wait_for_slave_sql_error.inc [errno=1050]
STOP SLAVE IO_THREAD;
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
connection server_1;
INSERT INTO t1 VALUES(3);
@@ -238,6 +252,9 @@ connection server_2;
include/stop_slave.inc
DROP TABLE t1;
RESET SLAVE ALL;
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'Current_Pos' to 'Slave_Pos'
+CHANGE MASTER TO MASTER_USE_GTID=NO;
RESET MASTER;
SET GLOBAL gtid_slave_pos= "";
CHANGE MASTER TO master_host='127.0.0.1', master_port=MASTER_PORT, master_user='root', master_use_gtid=no, master_log_file="", master_log_pos= 4;
diff --git a/mysql-test/suite/rpl/r/rpl_gtid_stop_start.result b/mysql-test/suite/rpl/r/rpl_gtid_stop_start.result
index 50f24d56e9a..2bdfcb14123 100644
--- a/mysql-test/suite/rpl/r/rpl_gtid_stop_start.result
+++ b/mysql-test/suite/rpl/r/rpl_gtid_stop_start.result
@@ -6,8 +6,10 @@ INSERT INTO t1 VALUES (1);
connection server_2;
include/stop_slave.inc
Master_Log_File = 'master-bin.000001'
-Using_Gtid = 'No'
+Using_Gtid = 'Slave_Pos'
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
FLUSH LOGS;
connection server_1;
FLUSH LOGS;
diff --git a/mysql-test/suite/rpl/r/rpl_gtid_until.result b/mysql-test/suite/rpl/r/rpl_gtid_until.result
index 1032b8ddd5c..85b066608e5 100644
--- a/mysql-test/suite/rpl/r/rpl_gtid_until.result
+++ b/mysql-test/suite/rpl/r/rpl_gtid_until.result
@@ -1,4 +1,8 @@
include/rpl_init.inc [topology=1->2]
+connection server_2;
+include/stop_slave.inc
+CHANGE MASTER TO MASTER_USE_GTID=NO;
+include/start_slave.inc
connection server_1;
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
CREATE FUNCTION extract_gtid(d VARCHAR(100), s VARCHAR(100))
@@ -26,6 +30,8 @@ include/stop_slave_io.inc
START SLAVE UNTIL master_gtid_pos = "";
ERROR HY000: START SLAVE UNTIL master_gtid_pos requires that slave is using GTID
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
connection server_1;
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES(1);
@@ -199,6 +205,8 @@ include/start_slave.inc
connection server_2;
include/stop_slave.inc
RESET SLAVE ALL;
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'Current_Pos' to 'Slave_Pos'
RESET MASTER;
SET GLOBAL gtid_slave_pos='';
connection server_1;
@@ -212,6 +220,8 @@ INSERT INTO t1 VALUES (10);
connection server_2;
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 UNTIL master_gtid_pos = '0-1-2';
include/wait_for_slave_to_start.inc
connection server_1;
diff --git a/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result b/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result
index 1db69ea4b83..88e0214150b 100644
--- a/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result
+++ b/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result
@@ -14,12 +14,12 @@ connection slave;
*** Default value ***
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root';
slave_net_timeout/slave_heartbeat_timeout=2.0000
-RESET SLAVE;
+include/reset_slave.inc
*** Reset slave affect ***
SET @@global.slave_net_timeout=30;
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_CONNECT_RETRY=20, MASTER_HEARTBEAT_PERIOD=5;
-RESET SLAVE;
+include/reset_slave.inc
SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period';
Variable_name Value
Slave_heartbeat_period 15.000
@@ -31,7 +31,7 @@ SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period';
Variable_name Value
Slave_heartbeat_period 25.000
SET @@global.slave_net_timeout=@restore_slave_net_timeout;
-RESET SLAVE;
+include/reset_slave.inc
*** Warning if updated slave_net_timeout < slave_heartbeat_timeout ***
SET @@global.slave_net_timeout=FLOOR(SLAVE_HEARTBEAT_TIMEOUT)-1;
@@ -223,11 +223,15 @@ INSERT INTO t1 VALUES (1, 'on slave', NULL);
connection master;
INSERT INTO t1 VALUES (1, 'on master', NULL);
connection slave;
+set sql_log_bin= 0;
call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.. on query.* error.* 1062");
call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
+set sql_log_bin= 1;
Heartbeat events are received while sql thread stopped (1 means 'yes'): 1
include/stop_slave.inc
+set sql_log_bin= 0;
DROP TABLE t1;
+set sql_log_bin= 1;
*** Master send to slave ***
connection master;
@@ -240,7 +244,9 @@ END|
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
connection slave;
-RESET 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-2. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_CONNECT_RETRY=20, MASTER_HEARTBEAT_PERIOD=5;
include/start_slave.inc
connection master;
@@ -256,8 +262,10 @@ connection slave;
*** Flush logs on slave ***
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
+set sql_log_bin= 0;
DROP TABLE t1;
+set sql_log_bin= 1;
connection master;
DROP TABLE t1;
RESET MASTER;
@@ -271,7 +279,7 @@ connection master;
SET @@global.slave_compressed_protocol=1;
connection slave;
include/stop_slave.inc
-RESET SLAVE;
+include/reset_slave.inc
SET @@global.slave_compressed_protocol=1;
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_CONNECT_RETRY=20, MASTER_HEARTBEAT_PERIOD=0.1;
include/start_slave.inc
@@ -283,7 +291,7 @@ SET @@global.slave_compressed_protocol=0;
*** Reset master ***
connection slave;
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_CONNECT_RETRY=20, MASTER_HEARTBEAT_PERIOD=0.1;
include/start_slave.inc
connection master;
@@ -294,7 +302,7 @@ Heartbeat events are received after reset of master (1 means 'yes'): 1
*** Reload master ***
connection slave;
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_CONNECT_RETRY=20, MASTER_HEARTBEAT_PERIOD=0.1;
include/start_slave.inc
Heartbeat event received
diff --git a/mysql-test/suite/rpl/r/rpl_heartbeat_ssl.result b/mysql-test/suite/rpl/r/rpl_heartbeat_ssl.result
index ff7178ae700..533290d25ca 100644
--- a/mysql-test/suite/rpl/r/rpl_heartbeat_ssl.result
+++ b/mysql-test/suite/rpl/r/rpl_heartbeat_ssl.result
@@ -15,7 +15,8 @@ MASTER_LOG_FILE='MASTER_BINLOG',
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';
+MASTER_SSL_KEY='MYSQL_TEST_DIR/std_data/client-key.pem',
+MASTER_USE_GTID=NO;
include/start_slave.inc
Master_SSL_Allowed: Yes
Heartbeat event has received
diff --git a/mysql-test/suite/rpl/r/rpl_hrtime.result b/mysql-test/suite/rpl/r/rpl_hrtime.result
index 5f0b8f4123a..230029d9119 100644
--- a/mysql-test/suite/rpl/r/rpl_hrtime.result
+++ b/mysql-test/suite/rpl/r/rpl_hrtime.result
@@ -37,7 +37,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1293832861/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=1/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
diff --git a/mysql-test/suite/rpl/r/rpl_innodb_bug68220.result b/mysql-test/suite/rpl/r/rpl_innodb_bug68220.result
deleted file mode 100644
index a9c8c6d612f..00000000000
--- a/mysql-test/suite/rpl/r/rpl_innodb_bug68220.result
+++ /dev/null
@@ -1,233 +0,0 @@
-include/master-slave.inc
-[connection master]
-connection master;
-select variable_value into @master_rows_read from information_schema.global_status where variable_name = 'innodb_rows_read';
-select variable_value into @master_rows_updated from information_schema.global_status where variable_name = 'innodb_rows_updated';
-select variable_value into @master_rows_deleted from information_schema.global_status where variable_name = 'innodb_rows_deleted';
-select variable_value into @master_rows_inserted from information_schema.global_status where variable_name = 'innodb_rows_inserted';
-select variable_value into @master_system_rows_read from information_schema.global_status where variable_name = 'innodb_system_rows_read';
-select variable_value into @master_system_rows_updated from information_schema.global_status where variable_name = 'innodb_system_rows_updated';
-select variable_value into @master_system_rows_deleted from information_schema.global_status where variable_name = 'innodb_system_rows_deleted';
-select variable_value into @master_system_rows_inserted from information_schema.global_status where variable_name = 'innodb_system_rows_inserted';
-connection slave;
-select variable_value into @slave_rows_read from information_schema.global_status where variable_name = 'innodb_rows_read';
-select variable_value into @slave_rows_updated from information_schema.global_status where variable_name = 'innodb_rows_updated';
-select variable_value into @slave_rows_deleted from information_schema.global_status where variable_name = 'innodb_rows_deleted';
-select variable_value into @slave_rows_inserted from information_schema.global_status where variable_name = 'innodb_rows_inserted';
-select variable_value into @slave_system_rows_read from information_schema.global_status where variable_name = 'innodb_system_rows_read';
-select variable_value into @slave_system_rows_updated from information_schema.global_status where variable_name = 'innodb_system_rows_updated';
-select variable_value into @slave_system_rows_deleted from information_schema.global_status where variable_name = 'innodb_system_rows_deleted';
-select variable_value into @slave_system_rows_inserted from information_schema.global_status where variable_name = 'innodb_system_rows_inserted';
-connection master;
-CREATE DATABASE testdb;
-USE testdb;
-CREATE TABLE testdb.t1 (i int NOT NULL PRIMARY KEY) ENGINE=InnoDB;
-INSERT INTO testdb.t1 VALUES (1);
-connection master;
-select variable_value into @rows_read from information_schema.global_status where variable_name = 'innodb_rows_read';
-select @rows_read - @master_rows_read;
-@rows_read - @master_rows_read
-0
-select variable_value into @rows_updated from information_schema.global_status where variable_name = 'innodb_rows_updated';
-select @rows_updated - @master_rows_updated;
-@rows_updated - @master_rows_updated
-0
-select variable_value into @rows_deleted from information_schema.global_status where variable_name = 'innodb_rows_deleted';
-select @rows_deleted - @master_rows_deleted;
-@rows_deleted - @master_rows_deleted
-0
-select variable_value into @rows_inserted from information_schema.global_status where variable_name = 'innodb_rows_inserted';
-select @rows_inserted - @master_rows_inserted;
-@rows_inserted - @master_rows_inserted
-1
-select variable_value into @system_rows_read from information_schema.global_status where variable_name = 'innodb_system_rows_read';
-select @system_rows_read - @master_system_rows_read;
-@system_rows_read - @master_system_rows_read
-0
-select variable_value into @system_rows_updated from information_schema.global_status where variable_name = 'innodb_system_rows_updated';
-select @system_rows_updated - @master_system_rows_updated;
-@system_rows_updated - @master_system_rows_updated
-0
-select variable_value into @system_rows_deleted from information_schema.global_status where variable_name = 'innodb_system_rows_deleted';
-select @system_rows_deleted - @master_system_rows_deleted;
-@system_rows_deleted - @master_system_rows_deleted
-0
-select variable_value into @system_rows_inserted from information_schema.global_status where variable_name = 'innodb_system_rows_inserted';
-select @system_rows_inserted - @master_system_rows_inserted;
-@system_rows_inserted - @master_system_rows_inserted
-0
-connection slave;
-select variable_value into @rows_read from information_schema.global_status where variable_name = 'innodb_rows_read';
-select @rows_read - @slave_rows_read;
-@rows_read - @slave_rows_read
-0
-select variable_value into @rows_updated from information_schema.global_status where variable_name = 'innodb_rows_updated';
-select @rows_updated - @slave_rows_updated;
-@rows_updated - @slave_rows_updated
-0
-select variable_value into @rows_deleted from information_schema.global_status where variable_name = 'innodb_rows_deleted';
-select @rows_deleted - @slave_rows_deleted;
-@rows_deleted - @slave_rows_deleted
-0
-select variable_value into @rows_inserted from information_schema.global_status where variable_name = 'innodb_rows_inserted';
-select @rows_inserted - @slave_rows_inserted;
-@rows_inserted - @slave_rows_inserted
-1
-select variable_value into @system_rows_read from information_schema.global_status where variable_name = 'innodb_system_rows_read';
-select @system_rows_read - @slave_system_rows_read;
-@system_rows_read - @slave_system_rows_read
-0
-select variable_value into @system_rows_updated from information_schema.global_status where variable_name = 'innodb_system_rows_updated';
-select @system_rows_updated - @slave_system_rows_updated;
-@system_rows_updated - @slave_system_rows_updated
-0
-select variable_value into @system_rows_deleted from information_schema.global_status where variable_name = 'innodb_system_rows_deleted';
-select @system_rows_deleted - @slave_system_rows_deleted;
-@system_rows_deleted - @slave_system_rows_deleted
-0
-select variable_value into @system_rows_inserted from information_schema.global_status where variable_name = 'innodb_system_rows_inserted';
-select @system_rows_inserted - @slave_system_rows_inserted;
-@system_rows_inserted - @slave_system_rows_inserted
-0
-connection master;
-UPDATE t1 SET i=2 WHERE i=1;
-connection slave;
-connection master;
-select variable_value into @rows_read from information_schema.global_status where variable_name = 'innodb_rows_read';
-select @rows_read - @master_rows_read;
-@rows_read - @master_rows_read
-1
-select variable_value into @rows_updated from information_schema.global_status where variable_name = 'innodb_rows_updated';
-select @rows_updated - @master_rows_updated;
-@rows_updated - @master_rows_updated
-1
-select variable_value into @rows_deleted from information_schema.global_status where variable_name = 'innodb_rows_deleted';
-select @rows_deleted - @master_rows_deleted;
-@rows_deleted - @master_rows_deleted
-0
-select variable_value into @rows_inserted from information_schema.global_status where variable_name = 'innodb_rows_inserted';
-select @rows_inserted - @master_rows_inserted;
-@rows_inserted - @master_rows_inserted
-1
-select variable_value into @system_rows_read from information_schema.global_status where variable_name = 'innodb_system_rows_read';
-select @system_rows_read - @master_system_rows_read;
-@system_rows_read - @master_system_rows_read
-0
-select variable_value into @system_rows_updated from information_schema.global_status where variable_name = 'innodb_system_rows_updated';
-select @system_rows_updated - @master_system_rows_updated;
-@system_rows_updated - @master_system_rows_updated
-0
-select variable_value into @system_rows_deleted from information_schema.global_status where variable_name = 'innodb_system_rows_deleted';
-select @system_rows_deleted - @master_system_rows_deleted;
-@system_rows_deleted - @master_system_rows_deleted
-0
-select variable_value into @system_rows_inserted from information_schema.global_status where variable_name = 'innodb_system_rows_inserted';
-select @system_rows_inserted - @master_system_rows_inserted;
-@system_rows_inserted - @master_system_rows_inserted
-0
-connection slave;
-select variable_value into @rows_read from information_schema.global_status where variable_name = 'innodb_rows_read';
-select @rows_read - @slave_rows_read;
-@rows_read - @slave_rows_read
-1
-select variable_value into @rows_updated from information_schema.global_status where variable_name = 'innodb_rows_updated';
-select @rows_updated - @slave_rows_updated;
-@rows_updated - @slave_rows_updated
-1
-select variable_value into @rows_deleted from information_schema.global_status where variable_name = 'innodb_rows_deleted';
-select @rows_deleted - @slave_rows_deleted;
-@rows_deleted - @slave_rows_deleted
-0
-select variable_value into @rows_inserted from information_schema.global_status where variable_name = 'innodb_rows_inserted';
-select @rows_inserted - @slave_rows_inserted;
-@rows_inserted - @slave_rows_inserted
-1
-select variable_value into @system_rows_read from information_schema.global_status where variable_name = 'innodb_system_rows_read';
-select @system_rows_read - @slave_system_rows_read;
-@system_rows_read - @slave_system_rows_read
-0
-select variable_value into @system_rows_updated from information_schema.global_status where variable_name = 'innodb_system_rows_updated';
-select @system_rows_updated - @slave_system_rows_updated;
-@system_rows_updated - @slave_system_rows_updated
-0
-select variable_value into @system_rows_deleted from information_schema.global_status where variable_name = 'innodb_system_rows_deleted';
-select @system_rows_deleted - @slave_system_rows_deleted;
-@system_rows_deleted - @slave_system_rows_deleted
-0
-select variable_value into @system_rows_inserted from information_schema.global_status where variable_name = 'innodb_system_rows_inserted';
-select @system_rows_inserted - @slave_system_rows_inserted;
-@system_rows_inserted - @slave_system_rows_inserted
-0
-connection master;
-DELETE FROM t1 WHERE i=2;
-connection master;
-select variable_value into @rows_read from information_schema.global_status where variable_name = 'innodb_rows_read';
-select @rows_read - @master_rows_read;
-@rows_read - @master_rows_read
-2
-select variable_value into @rows_updated from information_schema.global_status where variable_name = 'innodb_rows_updated';
-select @rows_updated - @master_rows_updated;
-@rows_updated - @master_rows_updated
-1
-select variable_value into @rows_deleted from information_schema.global_status where variable_name = 'innodb_rows_deleted';
-select @rows_deleted - @master_rows_deleted;
-@rows_deleted - @master_rows_deleted
-1
-select variable_value into @rows_inserted from information_schema.global_status where variable_name = 'innodb_rows_inserted';
-select @rows_inserted - @master_rows_inserted;
-@rows_inserted - @master_rows_inserted
-1
-select variable_value into @system_rows_read from information_schema.global_status where variable_name = 'innodb_system_rows_read';
-select @system_rows_read - @master_system_rows_read;
-@system_rows_read - @master_system_rows_read
-0
-select variable_value into @system_rows_updated from information_schema.global_status where variable_name = 'innodb_system_rows_updated';
-select @system_rows_updated - @master_system_rows_updated;
-@system_rows_updated - @master_system_rows_updated
-0
-select variable_value into @system_rows_deleted from information_schema.global_status where variable_name = 'innodb_system_rows_deleted';
-select @system_rows_deleted - @master_system_rows_deleted;
-@system_rows_deleted - @master_system_rows_deleted
-0
-select variable_value into @system_rows_inserted from information_schema.global_status where variable_name = 'innodb_system_rows_inserted';
-select @system_rows_inserted - @master_system_rows_inserted;
-@system_rows_inserted - @master_system_rows_inserted
-0
-connection slave;
-select variable_value into @rows_read from information_schema.global_status where variable_name = 'innodb_rows_read';
-select @rows_read - @slave_rows_read;
-@rows_read - @slave_rows_read
-2
-select variable_value into @rows_updated from information_schema.global_status where variable_name = 'innodb_rows_updated';
-select @rows_updated - @slave_rows_updated;
-@rows_updated - @slave_rows_updated
-1
-select variable_value into @rows_deleted from information_schema.global_status where variable_name = 'innodb_rows_deleted';
-select @rows_deleted - @slave_rows_deleted;
-@rows_deleted - @slave_rows_deleted
-1
-select variable_value into @rows_inserted from information_schema.global_status where variable_name = 'innodb_rows_inserted';
-select @rows_inserted - @slave_rows_inserted;
-@rows_inserted - @slave_rows_inserted
-1
-select variable_value into @system_rows_read from information_schema.global_status where variable_name = 'innodb_system_rows_read';
-select @system_rows_read - @slave_system_rows_read;
-@system_rows_read - @slave_system_rows_read
-0
-select variable_value into @system_rows_updated from information_schema.global_status where variable_name = 'innodb_system_rows_updated';
-select @system_rows_updated - @slave_system_rows_updated;
-@system_rows_updated - @slave_system_rows_updated
-0
-select variable_value into @system_rows_deleted from information_schema.global_status where variable_name = 'innodb_system_rows_deleted';
-select @system_rows_deleted - @slave_system_rows_deleted;
-@system_rows_deleted - @slave_system_rows_deleted
-0
-select variable_value into @system_rows_inserted from information_schema.global_status where variable_name = 'innodb_system_rows_inserted';
-select @system_rows_inserted - @slave_system_rows_inserted;
-@system_rows_inserted - @slave_system_rows_inserted
-0
-connection master;
-DROP TABLE t1;
-DROP DATABASE testdb;
-connection slave;
-include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_loaddata.result b/mysql-test/suite/rpl/r/rpl_loaddata.result
index e759f34bb9d..0be197642e9 100644
--- a/mysql-test/suite/rpl/r/rpl_loaddata.result
+++ b/mysql-test/suite/rpl/r/rpl_loaddata.result
@@ -57,7 +57,9 @@ load data infile '../../std_data/rpl_loaddata.dat' into table t1;
connection slave;
include/wait_for_slave_sql_error.inc [errno=1062]
stop slave;
-reset 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-14. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
include/check_slave_no_error.inc
connection master;
reset master;
diff --git a/mysql-test/suite/rpl/r/rpl_log_pos.result b/mysql-test/suite/rpl/r/rpl_log_pos.result
index 7f5f34bf831..74080b3936f 100644
--- a/mysql-test/suite/rpl/r/rpl_log_pos.result
+++ b/mysql-test/suite/rpl/r/rpl_log_pos.result
@@ -9,7 +9,7 @@ File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
include/stop_slave.inc
-change master to master_log_pos=MASTER_LOG_POS;
+change master to master_log_pos=MASTER_LOG_POS, master_use_gtid=no;
start slave;
include/wait_for_slave_io_error.inc [errno=1236]
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'binlog truncated in the middle of event; consider out of disk space on master; the first event 'master-bin.000001' at XXX, the last event read from 'master-bin.000001' at XXX, the last byte read from 'master-bin.000001' at XXX.''
@@ -23,7 +23,7 @@ drop table if exists t1;
create table t1 (n int);
insert into t1 values (1),(2),(3);
connection slave;
-change master to master_log_pos=MASTER_LOG_POS;
+change master to master_log_pos=MASTER_LOG_POS, master_use_gtid=no;
start slave;
select * from t1 ORDER BY n;
n
diff --git a/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result b/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result
index 78a86437867..9de66d179a6 100644
--- a/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result
+++ b/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result
@@ -1,5 +1,10 @@
include/master-slave.inc
[connection master]
+connection slave;
+include/stop_slave.inc
+CHANGE MASTER TO MASTER_USE_GTID=NO;
+include/start_slave.inc
+connection master;
FLUSH LOGS;
CREATE TABLE t1(c1 INT);
connection slave;
diff --git a/mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result b/mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result
index ac846ac6c00..68e8b22dd02 100644
--- a/mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result
+++ b/mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result
@@ -4,6 +4,9 @@ connection master;
set @old_master_binlog_checksum= @@global.binlog_checksum;
connection slave;
include/stop_slave.inc
+CHANGE MASTER TO MASTER_USE_GTID=NO;
+include/start_slave.inc
+include/stop_slave.inc
# Test slave with no capability gets dummy event, which is ignored.
set @old_dbug= @@global.debug_dbug;
SET @@global.debug_dbug='+d,simulate_slave_capability_none';
diff --git a/mysql-test/suite/rpl/r/rpl_mdev382.result b/mysql-test/suite/rpl/r/rpl_mdev382.result
index b88b47b2dfa..6a91d9d89de 100644
--- a/mysql-test/suite/rpl/r/rpl_mdev382.result
+++ b/mysql-test/suite/rpl/r/rpl_mdev382.result
@@ -179,7 +179,7 @@ ROLLBACK/*!*/;
use `db1``; select 'oops!'`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=1/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -279,7 +279,7 @@ ROLLBACK/*!*/;
use `db1``; select 'oops!'`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=1/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -388,7 +388,7 @@ START TRANSACTION
use `ts``et`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=1/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
diff --git a/mysql-test/suite/rpl/r/rpl_mdev6020.result b/mysql-test/suite/rpl/r/rpl_mdev6020.result
index b0cb392b04c..fbea6ac38d2 100644
--- a/mysql-test/suite/rpl/r/rpl_mdev6020.result
+++ b/mysql-test/suite/rpl/r/rpl_mdev6020.result
@@ -13,7 +13,7 @@ SET @old_engine= @@GLOBAL.default_storage_engine;
SET GLOBAL default_storage_engine=InnoDB;
SET @old_parallel= @@GLOBAL.slave_parallel_threads;
SET GLOBAL slave_parallel_threads=12;
-CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4;
+CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4, master_use_gtid=no;
include/start_slave.inc
connection master;
SET SQL_LOG_BIN=0;
diff --git a/mysql-test/suite/rpl/r/rpl_mdev6386.result b/mysql-test/suite/rpl/r/rpl_mdev6386.result
index d0e5144857a..d62543d8488 100644
--- a/mysql-test/suite/rpl/r/rpl_mdev6386.result
+++ b/mysql-test/suite/rpl/r/rpl_mdev6386.result
@@ -11,6 +11,8 @@ CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on w
INSERT INTO t1 VALUES (1, 2);
SET sql_log_bin= 1;
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
Contents on slave before:
SELECT * FROM t1 ORDER BY a;
a b
diff --git a/mysql-test/suite/rpl/r/rpl_mdev_17614.result b/mysql-test/suite/rpl/r/rpl_mdev_17614.result
index ba077111522..0cc924749c8 100644
--- a/mysql-test/suite/rpl/r/rpl_mdev_17614.result
+++ b/mysql-test/suite/rpl/r/rpl_mdev_17614.result
@@ -31,7 +31,7 @@ a b c
2 2 3
stop slave;
include/wait_for_slave_to_stop.inc
-reset slave;
+include/reset_slave.inc
connection master;
reset master;
drop table t1;
@@ -191,7 +191,7 @@ a b c
2 2 3
stop slave;
include/wait_for_slave_to_stop.inc
-reset slave;
+include/reset_slave.inc
connection master;
reset master;
drop table t1;
diff --git a/mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result b/mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result
index 944ad9331ad..e94e097f41f 100644
--- a/mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result
+++ b/mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result
@@ -1,5 +1,10 @@
include/master-slave.inc
[connection master]
+connection slave;
+include/stop_slave.inc
+CHANGE MASTER TO MASTER_USE_GTID=NO;
+include/start_slave.inc
+connection master;
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
call mtr.add_suppression("Write to binary log failed: Multi-row statements required more than .max_binlog_stmt_cache_size");
call mtr.add_suppression("Write to binary log failed: Multi-statement transaction required more than .max_binlog_cache_size");
diff --git a/mysql-test/suite/rpl/r/rpl_mysql57_stm_temporal_round.result b/mysql-test/suite/rpl/r/rpl_mysql57_stm_temporal_round.result
index bedd103c2a0..7a5cf257458 100644
--- a/mysql-test/suite/rpl/r/rpl_mysql57_stm_temporal_round.result
+++ b/mysql-test/suite/rpl/r/rpl_mysql57_stm_temporal_round.result
@@ -10,7 +10,7 @@ connection master;
include/rpl_stop_server.inc [server_number=1]
include/rpl_start_server.inc [server_number=1]
connection slave;
-CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4;
+CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4, master_use_gtid=no;
include/start_slave.inc
connection master;
connection slave;
diff --git a/mysql-test/suite/rpl/r/rpl_mysql80_stm_temporal_round.result b/mysql-test/suite/rpl/r/rpl_mysql80_stm_temporal_round.result
index 23b3217895a..8e1d3d03952 100644
--- a/mysql-test/suite/rpl/r/rpl_mysql80_stm_temporal_round.result
+++ b/mysql-test/suite/rpl/r/rpl_mysql80_stm_temporal_round.result
@@ -10,7 +10,7 @@ connection master;
include/rpl_stop_server.inc [server_number=1]
include/rpl_start_server.inc [server_number=1]
connection slave;
-CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4;
+CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4, master_use_gtid=no;
include/start_slave.inc
connection master;
connection slave;
diff --git a/mysql-test/suite/rpl/r/rpl_old_master.result b/mysql-test/suite/rpl/r/rpl_old_master.result
index f985bee6832..5e9d8a88a20 100644
--- a/mysql-test/suite/rpl/r/rpl_old_master.result
+++ b/mysql-test/suite/rpl/r/rpl_old_master.result
@@ -8,7 +8,7 @@ include/rpl_start_server.inc [server_number=1]
connection slave;
SET @old_parallel= @@GLOBAL.slave_parallel_threads;
SET GLOBAL slave_parallel_threads=10;
-CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4;
+CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4, master_use_gtid=no;
FLUSH TABLES WITH READ LOCK;
include/start_slave.inc
include/wait_for_slave_param.inc [Seconds_Behind_Master]
diff --git a/mysql-test/suite/rpl/r/rpl_old_master_29078.result b/mysql-test/suite/rpl/r/rpl_old_master_29078.result
index 944c6c2a0bb..093e2ae0c24 100644
--- a/mysql-test/suite/rpl/r/rpl_old_master_29078.result
+++ b/mysql-test/suite/rpl/r/rpl_old_master_29078.result
@@ -47,45 +47,47 @@ ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
connection slave;
-set global explicit_defaults_for_timestamp=1;
-reset slave;
+set global explicit_defaults_for_timestamp=0;
+include/reset_slave.inc
include/start_slave.inc
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f1` timestamp NULL DEFAULT NULL,
- `f2` timestamp NULL DEFAULT NULL
+ `f1` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `f2` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `a` timestamp NULL DEFAULT NULL
+ `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
set time_zone='+2:00';
select * from t1;
f1 f2
-NULL NULL
-NULL NULL
+2022-07-23 16:24:48 2022-07-23 16:24:48
+2022-07-23 16:25:35 0000-00-00 00:00:00
drop table t1;
include/stop_slave.inc
-set global explicit_defaults_for_timestamp=0;
-reset slave;
+set global explicit_defaults_for_timestamp=1;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
include/start_slave.inc
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f1` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
- `f2` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
+ `f1` timestamp NULL DEFAULT NULL,
+ `f2` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
+ `a` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
select * from t1;
f1 f2
-2022-07-23 16:24:48 2022-07-23 16:24:48
-2022-07-23 16:25:35 0000-00-00 00:00:00
+NULL NULL
+NULL NULL
drop table t1;
connection master;
drop table t2;
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_29322.result b/mysql-test/suite/rpl/r/rpl_parallel_29322.result
index 55fa6a4acc3..205a7dbc9cf 100644
--- a/mysql-test/suite/rpl/r/rpl_parallel_29322.result
+++ b/mysql-test/suite/rpl/r/rpl_parallel_29322.result
@@ -16,7 +16,7 @@ set @@global.slave_parallel_workers = 1;
include/start_slave.inc
connection slave;
include/stop_slave.inc
-reset slave;
+include/reset_slave.inc
connection master;
reset master;
create table t2 (a timestamp, b int);
@@ -109,7 +109,9 @@ connection slave;
set @@global.explicit_defaults_for_timestamp = 1;
connection slave;
include/stop_slave.inc
-reset slave;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
connection master;
reset master;
create table t2 (a timestamp, b int);
@@ -201,7 +203,9 @@ set @@global.slave_parallel_workers = 4;
include/start_slave.inc
connection slave;
include/stop_slave.inc
-reset slave;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
connection master;
reset master;
create table t2 (a timestamp, b int);
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_mdev6589.result b/mysql-test/suite/rpl/r/rpl_parallel_mdev6589.result
index 47cdb3496da..ed297d10f2a 100644
--- a/mysql-test/suite/rpl/r/rpl_parallel_mdev6589.result
+++ b/mysql-test/suite/rpl/r/rpl_parallel_mdev6589.result
@@ -5,6 +5,8 @@ SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
include/stop_slave.inc
SET GLOBAL slave_parallel_threads=10;
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
*** MDEV-6589: Incorrect relay log start position when restarting SQL thread after error in parallel replication ***
connection server_1;
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_multilevel2.result b/mysql-test/suite/rpl/r/rpl_parallel_multilevel2.result
index 674cd7a32b4..13508815877 100644
--- a/mysql-test/suite/rpl/r/rpl_parallel_multilevel2.result
+++ b/mysql-test/suite/rpl/r/rpl_parallel_multilevel2.result
@@ -18,11 +18,15 @@ SET @old_updates= @@GLOBAL.binlog_direct_non_transactional_updates;
SET GLOBAL binlog_direct_non_transactional_updates=OFF;
SET SESSION binlog_direct_non_transactional_updates=OFF;
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
connection server_3;
SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
include/stop_slave.inc
SET GLOBAL slave_parallel_threads=10;
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
connection server_1;
BEGIN;
CREATE TEMPORARY TABLE t2 (a INT PRIMARY KEY) ENGINE=MEMORY;
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_temptable.result b/mysql-test/suite/rpl/r/rpl_parallel_temptable.result
index 1a1c12f836d..9519bffaa27 100644
--- a/mysql-test/suite/rpl/r/rpl_parallel_temptable.result
+++ b/mysql-test/suite/rpl/r/rpl_parallel_temptable.result
@@ -5,6 +5,8 @@ SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
include/stop_slave.inc
SET GLOBAL slave_parallel_threads=5;
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
connection server_1;
CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(100) CHARACTER SET utf8);
diff --git a/mysql-test/suite/rpl/r/rpl_perfschema_applier_status_by_coordinator.result b/mysql-test/suite/rpl/r/rpl_perfschema_applier_status_by_coordinator.result
index 88e1848d46e..ffffb580518 100644
--- a/mysql-test/suite/rpl/r/rpl_perfschema_applier_status_by_coordinator.result
+++ b/mysql-test/suite/rpl/r/rpl_perfschema_applier_status_by_coordinator.result
@@ -55,6 +55,7 @@ connection slave;
include/stop_slave.inc
reset slave;
reset master;
+set @@global.gtid_slave_pos= "";
set @saved_slave_trans_retry_interval= @@GLOBAL.slave_transaction_retry_interval;
set global slave_transaction_retry_interval=1;
include/start_slave.inc
diff --git a/mysql-test/suite/rpl/r/rpl_perfschema_connect_config.result b/mysql-test/suite/rpl/r/rpl_perfschema_connect_config.result
index 4ace84ffac4..27cb29d3968 100644
--- a/mysql-test/suite/rpl/r/rpl_perfschema_connect_config.result
+++ b/mysql-test/suite/rpl/r/rpl_perfschema_connect_config.result
@@ -87,6 +87,8 @@ 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
diff --git a/mysql-test/suite/rpl/r/rpl_read_new_relay_log_info.result b/mysql-test/suite/rpl/r/rpl_read_new_relay_log_info.result
index 5c0002a911a..e193a7e1126 100644
--- a/mysql-test/suite/rpl/r/rpl_read_new_relay_log_info.result
+++ b/mysql-test/suite/rpl/r/rpl_read_new_relay_log_info.result
@@ -6,7 +6,7 @@ DROP TABLE t1;
connection slave;
==== Check that we can understand the new format of relay-log.info ====
include/stop_slave.inc
-RESET SLAVE;
+include/reset_slave.inc
# Read relay-log.info
START SLAVE IO_THREAD;
include/wait_for_slave_io_to_start.inc
diff --git a/mysql-test/suite/rpl/r/rpl_read_old_relay_log_info.result b/mysql-test/suite/rpl/r/rpl_read_old_relay_log_info.result
index 217bc726e0e..151a00a514b 100644
--- a/mysql-test/suite/rpl/r/rpl_read_old_relay_log_info.result
+++ b/mysql-test/suite/rpl/r/rpl_read_old_relay_log_info.result
@@ -6,7 +6,7 @@ DROP TABLE t1;
connection slave;
==== Check that we still understand the old format of relay-log.info ====
include/stop_slave.inc
-RESET SLAVE;
+include/reset_slave.inc
# Read relay-log.info
START SLAVE IO_THREAD;
include/wait_for_slave_io_to_start.inc
diff --git a/mysql-test/suite/rpl/r/rpl_reset_slave_fail.result b/mysql-test/suite/rpl/r/rpl_reset_slave_fail.result
index 34ce68cb079..ff2da0a900a 100644
--- a/mysql-test/suite/rpl/r/rpl_reset_slave_fail.result
+++ b/mysql-test/suite/rpl/r/rpl_reset_slave_fail.result
@@ -22,7 +22,7 @@ START SLAVE;
ERROR HY000: Could not initialize master info structure for ''; more error messages can be found in the MariaDB error log
START SLAVE;
ERROR HY000: Could not initialize master info structure for ''; more error messages can be found in the MariaDB error log
-RESET SLAVE;
+include/reset_slave.inc
DROP TABLE t1;
START SLAVE UNTIL MASTER_LOG_FILE= 'MASTER_LOG_FILE', MASTER_LOG_POS= MASTER_LOG_POS;;
include/wait_for_slave_sql_to_stop.inc
diff --git a/mysql-test/suite/rpl/r/rpl_row_001.result b/mysql-test/suite/rpl/r/rpl_row_001.result
index 976ac0996bf..926404d29be 100644
--- a/mysql-test/suite/rpl/r/rpl_row_001.result
+++ b/mysql-test/suite/rpl/r/rpl_row_001.result
@@ -6,7 +6,7 @@ connection master;
RESET MASTER;
connection slave;
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
connection master;
SELECT COUNT(*) FROM t1;
COUNT(*)
diff --git a/mysql-test/suite/rpl/r/rpl_row_colSize.result b/mysql-test/suite/rpl/r/rpl_row_colSize.result
index 748d83a7f8e..dbfb9325f9c 100644
--- a/mysql-test/suite/rpl/r/rpl_row_colSize.result
+++ b/mysql-test/suite/rpl/r/rpl_row_colSize.result
@@ -11,7 +11,7 @@ Warnings:
Note 1051 Unknown table 'test.t1'
connection slave;
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
CREATE TABLE t1 (a DECIMAL(5,2));
connection master;
CREATE TABLE t1 (a DECIMAL(20, 10));
@@ -25,7 +25,9 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
0
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
connection master;
RESET MASTER;
connection slave;
@@ -34,7 +36,9 @@ connection master;
DROP TABLE IF EXISTS t1;
connection slave;
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
CREATE TABLE t1 (a DECIMAL(27, 9));
connection master;
CREATE TABLE t1 (a DECIMAL(27, 18));
@@ -48,7 +52,9 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
0
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
connection master;
RESET MASTER;
connection slave;
@@ -57,7 +63,9 @@ connection master;
DROP TABLE IF EXISTS t1;
connection slave;
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
CREATE TABLE t1 (a NUMERIC(5,2));
connection master;
CREATE TABLE t1 (a NUMERIC(20, 10));
@@ -71,7 +79,9 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
0
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
connection master;
RESET MASTER;
connection slave;
@@ -81,7 +91,9 @@ connection master;
DROP TABLE IF EXISTS t1;
connection slave;
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
CREATE TABLE t1 (a FLOAT(20));
connection master;
CREATE TABLE t1 (a FLOAT(47));
@@ -95,7 +107,9 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
0
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
connection master;
RESET MASTER;
connection slave;
@@ -105,7 +119,9 @@ connection master;
DROP TABLE IF EXISTS t1;
connection slave;
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
CREATE TABLE t1 (a BIT(5));
connection master;
CREATE TABLE t1 (a BIT(64));
@@ -119,7 +135,9 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
0
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
connection master;
RESET MASTER;
connection slave;
@@ -128,7 +146,9 @@ connection master;
DROP TABLE IF EXISTS t1;
connection slave;
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
CREATE TABLE t1 (a BIT(11));
connection master;
CREATE TABLE t1 (a BIT(12));
@@ -142,7 +162,9 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
0
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
connection master;
RESET MASTER;
connection slave;
@@ -152,7 +174,9 @@ connection master;
DROP TABLE IF EXISTS t1;
connection slave;
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
CREATE TABLE t1 (a SET('4'));
connection master;
CREATE TABLE t1 (a SET('1','2','3','4','5','6','7','8','9'));
@@ -166,7 +190,9 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
0
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
connection master;
RESET MASTER;
connection slave;
@@ -176,7 +202,9 @@ connection master;
DROP TABLE IF EXISTS t1;
connection slave;
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
CREATE TABLE t1 (a CHAR(10));
connection master;
CREATE TABLE t1 (a CHAR(20));
@@ -190,7 +218,9 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
0
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
connection master;
RESET MASTER;
connection slave;
@@ -200,7 +230,9 @@ connection master;
DROP TABLE IF EXISTS t1;
connection slave;
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
CREATE TABLE t1 (a ENUM('44','54'));
connection master;
CREATE TABLE t1 (a ENUM(
@@ -245,7 +277,9 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
0
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
connection master;
RESET MASTER;
connection slave;
@@ -255,7 +289,9 @@ connection master;
DROP TABLE IF EXISTS t1;
connection slave;
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
CREATE TABLE t1 (a VARCHAR(100));
connection master;
CREATE TABLE t1 (a VARCHAR(2000));
@@ -269,7 +305,9 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
0
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
connection master;
RESET MASTER;
connection slave;
@@ -278,7 +316,9 @@ connection master;
DROP TABLE IF EXISTS t1;
connection slave;
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
CREATE TABLE t1 (a VARCHAR(10));
connection master;
CREATE TABLE t1 (a VARCHAR(200));
@@ -292,7 +332,9 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
0
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
connection master;
RESET MASTER;
connection slave;
@@ -301,7 +343,9 @@ connection master;
DROP TABLE IF EXISTS t1;
connection slave;
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
CREATE TABLE t1 (a VARCHAR(1000));
connection master;
CREATE TABLE t1 (a VARCHAR(2000));
@@ -315,7 +359,9 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
0
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
connection master;
RESET MASTER;
connection slave;
@@ -325,7 +371,9 @@ connection master;
DROP TABLE IF EXISTS t1;
connection slave;
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
CREATE TABLE t1 (a TINYBLOB);
connection master;
CREATE TABLE t1 (a LONGBLOB);
@@ -339,7 +387,9 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
0
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
connection master;
RESET MASTER;
connection slave;
diff --git a/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result b/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result
index 660c736795b..8ce08e9d550 100644
--- a/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result
+++ b/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result
@@ -1,5 +1,10 @@
include/master-slave.inc
[connection master]
+connection slave;
+include/stop_slave.inc
+change master to master_use_gtid=no;
+include/start_slave.inc
+connection master;
create table t1 (a int) ENGINE=MyISAM;
insert into t1 values (10);
create table t2 (a int) ENGINE=MyISAM;
diff --git a/mysql-test/suite/rpl/r/rpl_row_loaddata_concurrent.result b/mysql-test/suite/rpl/r/rpl_row_loaddata_concurrent.result
index 0704f5c69a1..bf63dc57c4b 100644
--- a/mysql-test/suite/rpl/r/rpl_row_loaddata_concurrent.result
+++ b/mysql-test/suite/rpl/r/rpl_row_loaddata_concurrent.result
@@ -75,7 +75,9 @@ load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1;
connection slave;
include/wait_for_slave_sql_error.inc [errno=1062]
stop slave;
-reset 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-11. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
include/check_slave_no_error.inc
connection master;
reset master;
diff --git a/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result b/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result
index 83f16122d96..67251e2ef72 100644
--- a/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result
+++ b/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result
@@ -91,7 +91,7 @@ include/wait_for_slave_to_stop.inc
connection master;
reset master;
connection slave;
-reset slave;
+include/reset_slave.inc
start slave;
include/wait_for_slave_to_start.inc
connection master;
@@ -168,7 +168,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=1/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -191,7 +191,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=1/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -221,7 +221,7 @@ include/wait_for_slave_to_stop.inc
connection master;
reset master;
connection slave;
-reset slave;
+include/reset_slave.inc
start slave;
include/wait_for_slave_to_start.inc
connection master;
@@ -306,7 +306,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=1/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -335,7 +335,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=1/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -356,7 +356,7 @@ include/wait_for_slave_to_stop.inc
connection master;
reset master;
connection slave;
-reset slave;
+include/reset_slave.inc
start slave;
include/wait_for_slave_to_start.inc
connection master;
diff --git a/mysql-test/suite/rpl/r/rpl_row_reset_slave.result b/mysql-test/suite/rpl/r/rpl_row_reset_slave.result
index b9e98d5a97d..5e595447e50 100644
--- a/mysql-test/suite/rpl/r/rpl_row_reset_slave.result
+++ b/mysql-test/suite/rpl/r/rpl_row_reset_slave.result
@@ -7,7 +7,7 @@ include/stop_slave.inc
change master to master_user='test';
Master_User = 'test'
Master_Host = '127.0.0.1'
-reset slave;
+include/reset_slave.inc
Master_User = 'test'
Master_Host = '127.0.0.1'
change master to master_user='root';
@@ -15,13 +15,13 @@ include/start_slave.inc
Master_User = 'root'
Master_Host = '127.0.0.1'
include/stop_slave.inc
-reset slave;
+include/reset_slave.inc
include/start_slave.inc
connection master;
create temporary table t1 (a int);
connection slave;
include/stop_slave.inc
-reset slave;
+include/reset_slave.inc
include/start_slave.inc
show status like 'slave_open_temp_tables';
Variable_name Value
@@ -30,7 +30,7 @@ connection master;
drop temporary table if exists t1;
connection slave;
include/stop_slave.inc
-reset slave;
+include/reset_slave.inc
include/check_slave_no_error.inc
change master to master_user='impossible_user_name';
start slave;
@@ -44,13 +44,14 @@ change master to master_user='impossible_user_name';
start slave;
include/wait_for_slave_io_error.inc [errno=1045]
include/stop_slave_sql.inc
-reset slave;
+include/reset_slave.inc
include/check_slave_no_error.inc
change master to master_user='root';
-reset slave;
+include/reset_slave.inc
include/start_slave.inc
include/stop_slave.inc
reset slave all;
+set @@global.gtid_slave_pos= "";
start slave;
ERROR HY000: Misconfigured slave: MASTER_HOST was not set; Fix in config file or with CHANGE MASTER TO
CHANGE MASTER TO MASTER_HOST= 'MASTER_HOST', MASTER_USER= 'MASTER_USER', MASTER_PORT= MASTER_PORT;
diff --git a/mysql-test/suite/rpl/r/rpl_row_until.result b/mysql-test/suite/rpl/r/rpl_row_until.result
index 82268ce72eb..8ef10bf47b5 100644
--- a/mysql-test/suite/rpl/r/rpl_row_until.result
+++ b/mysql-test/suite/rpl/r/rpl_row_until.result
@@ -10,7 +10,7 @@ INSERT INTO t2 VALUES (3),(4);
DROP TABLE t2;
connection slave;
include/stop_slave.inc
-RESET SLAVE;
+include/reset_slave.inc
CHANGE MASTER TO MASTER_USER='root', MASTER_CONNECT_RETRY=1, MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_MYPORT;
connection slave;
START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=master_pos_drop_t1;
@@ -52,7 +52,7 @@ START SLAVE UNTIL RELAY_LOG_FILE='slave-relay-bin.000002', MASTER_LOG_POS=MASTER
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=MASTER_LOG_POS;
include/stop_slave.inc
-RESET SLAVE;
+include/reset_slave.inc
include/start_slave.inc
include/rpl_reset.inc
connection master;
diff --git a/mysql-test/suite/rpl/r/rpl_seconds_behind_master_spike.result b/mysql-test/suite/rpl/r/rpl_seconds_behind_master_spike.result
index 4eeb863bb40..eeafd679187 100644
--- a/mysql-test/suite/rpl/r/rpl_seconds_behind_master_spike.result
+++ b/mysql-test/suite/rpl/r/rpl_seconds_behind_master_spike.result
@@ -2,6 +2,9 @@ include/master-slave.inc
[connection master]
connection slave;
include/stop_slave.inc
+CHANGE MASTER TO MASTER_USE_GTID=NO;
+include/start_slave.inc
+include/stop_slave.inc
SET @save_dbug= @@GLOBAL.debug_dbug;
SET @@global.debug_dbug="+d,pause_sql_thread_on_fde";
include/start_slave.inc
diff --git a/mysql-test/suite/rpl/r/rpl_semi_sync.result b/mysql-test/suite/rpl/r/rpl_semi_sync.result
index d18bd1efda7..edd5e7748e0 100644
--- a/mysql-test/suite/rpl/r/rpl_semi_sync.result
+++ b/mysql-test/suite/rpl/r/rpl_semi_sync.result
@@ -6,16 +6,18 @@ call mtr.add_suppression("Read semi-sync reply");
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.");
call mtr.add_suppression("mysqld: Got an error reading communication packets");
connection slave;
+set sql_log_bin=0;
call mtr.add_suppression("Master server does not support semi-sync");
call mtr.add_suppression("Semi-sync slave .* reply");
call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
+set sql_log_bin=1;
connection master;
#
# Uninstall semi-sync plugins on master and slave
#
connection slave;
include/stop_slave.inc
-reset slave;
+include/reset_slave.inc
set global rpl_semi_sync_master_enabled= 0;
set global rpl_semi_sync_slave_enabled= 0;
connection master;
@@ -310,7 +312,7 @@ Variable_name Value
Rpl_semi_sync_master_yes_tx 0
connection slave;
include/stop_slave.inc
-reset slave;
+include/reset_slave.inc
include/kill_binlog_dump_threads.inc
connection slave;
include/start_slave.inc
@@ -340,7 +342,7 @@ Rpl_semi_sync_master_yes_tx 3
#
connection slave;
include/stop_slave.inc
-reset slave;
+include/reset_slave.inc
connection master;
reset master;
include/kill_binlog_dump_threads.inc
diff --git a/mysql-test/suite/rpl/r/rpl_semi_sync_after_sync.result b/mysql-test/suite/rpl/r/rpl_semi_sync_after_sync.result
index f2240817489..7341eb547f3 100644
--- a/mysql-test/suite/rpl/r/rpl_semi_sync_after_sync.result
+++ b/mysql-test/suite/rpl/r/rpl_semi_sync_after_sync.result
@@ -7,16 +7,18 @@ call mtr.add_suppression("Read semi-sync reply");
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.");
call mtr.add_suppression("mysqld: Got an error reading communication packets");
connection slave;
+set sql_log_bin=0;
call mtr.add_suppression("Master server does not support semi-sync");
call mtr.add_suppression("Semi-sync slave .* reply");
call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
+set sql_log_bin=1;
connection master;
#
# Uninstall semi-sync plugins on master and slave
#
connection slave;
include/stop_slave.inc
-reset slave;
+include/reset_slave.inc
set global rpl_semi_sync_master_enabled= 0;
set global rpl_semi_sync_slave_enabled= 0;
connection master;
@@ -311,7 +313,7 @@ Variable_name Value
Rpl_semi_sync_master_yes_tx 0
connection slave;
include/stop_slave.inc
-reset slave;
+include/reset_slave.inc
include/kill_binlog_dump_threads.inc
connection slave;
include/start_slave.inc
@@ -341,7 +343,7 @@ Rpl_semi_sync_master_yes_tx 3
#
connection slave;
include/stop_slave.inc
-reset slave;
+include/reset_slave.inc
connection master;
reset master;
include/kill_binlog_dump_threads.inc
diff --git a/mysql-test/suite/rpl/r/rpl_semi_sync_after_sync_row.result b/mysql-test/suite/rpl/r/rpl_semi_sync_after_sync_row.result
index fcced801d65..d75a3a2c9b7 100644
--- a/mysql-test/suite/rpl/r/rpl_semi_sync_after_sync_row.result
+++ b/mysql-test/suite/rpl/r/rpl_semi_sync_after_sync_row.result
@@ -7,16 +7,18 @@ call mtr.add_suppression("Read semi-sync reply");
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.");
call mtr.add_suppression("mysqld: Got an error reading communication packets");
connection slave;
+set sql_log_bin=0;
call mtr.add_suppression("Master server does not support semi-sync");
call mtr.add_suppression("Semi-sync slave .* reply");
call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
+set sql_log_bin=1;
connection master;
#
# Uninstall semi-sync plugins on master and slave
#
connection slave;
include/stop_slave.inc
-reset slave;
+include/reset_slave.inc
set global rpl_semi_sync_master_enabled= 0;
set global rpl_semi_sync_slave_enabled= 0;
connection master;
@@ -311,7 +313,7 @@ Variable_name Value
Rpl_semi_sync_master_yes_tx 0
connection slave;
include/stop_slave.inc
-reset slave;
+include/reset_slave.inc
include/kill_binlog_dump_threads.inc
connection slave;
include/start_slave.inc
@@ -341,7 +343,7 @@ Rpl_semi_sync_master_yes_tx 3
#
connection slave;
include/stop_slave.inc
-reset slave;
+include/reset_slave.inc
connection master;
reset master;
include/kill_binlog_dump_threads.inc
diff --git a/mysql-test/suite/rpl/r/rpl_server_id2.result b/mysql-test/suite/rpl/r/rpl_server_id2.result
index 74145645920..3d8eeb02ca6 100644
--- a/mysql-test/suite/rpl/r/rpl_server_id2.result
+++ b/mysql-test/suite/rpl/r/rpl_server_id2.result
@@ -1,6 +1,9 @@
include/master-slave.inc
[connection master]
connection slave;
+include/stop_slave.inc
+CHANGE MASTER TO MASTER_USE_GTID=NO;
+include/start_slave.inc
create table t1 (n int);
reset master;
stop slave;
diff --git a/mysql-test/suite/rpl/r/rpl_server_id_ignore.result b/mysql-test/suite/rpl/r/rpl_server_id_ignore.result
index 22f739d1ec0..3c7f2950d16 100644
--- a/mysql-test/suite/rpl/r/rpl_server_id_ignore.result
+++ b/mysql-test/suite/rpl/r/rpl_server_id_ignore.result
@@ -11,7 +11,7 @@ ignore server id list:
change master to IGNORE_SERVER_IDS= (10, 100);
*** must be 10, 100 ***
ignore server id list: 10, 100
-reset slave;
+include/reset_slave.inc
*** must be empty due to reset slave ***
ignore server id list: 10, 100
change master to IGNORE_SERVER_IDS= (10, 100);
@@ -33,7 +33,7 @@ Tables_in_test
*** allowing events from master ***
stop slave;
include/wait_for_slave_to_stop.inc
-reset slave;
+include/reset_slave.inc
change master to IGNORE_SERVER_IDS= (10, 100);
*** the list must remain (10, 100) after reset slave ***
change master to IGNORE_SERVER_IDS= ();
diff --git a/mysql-test/suite/rpl/r/rpl_skip_replication.result b/mysql-test/suite/rpl/r/rpl_skip_replication.result
index 59d5b50e5cc..96e0a30331d 100644
--- a/mysql-test/suite/rpl/r/rpl_skip_replication.result
+++ b/mysql-test/suite/rpl/r/rpl_skip_replication.result
@@ -1,6 +1,11 @@
include/master-slave.inc
[connection master]
connection slave;
+include/stop_slave.inc
+CHANGE MASTER TO MASTER_USE_GTID=NO;
+include/start_slave.inc
+connection master;
+connection slave;
CREATE USER 'nonsuperuser'@'127.0.0.1';
GRANT ALTER,CREATE,DELETE,DROP,EVENT,INSERT,PROCESS,REPLICATION SLAVE,
SELECT,UPDATE ON *.* TO 'nonsuperuser'@'127.0.0.1';
diff --git a/mysql-test/suite/rpl/r/rpl_slave_alias_replica.result b/mysql-test/suite/rpl/r/rpl_slave_alias_replica.result
index 2a49e80075f..0ede17132df 100644
--- a/mysql-test/suite/rpl/r/rpl_slave_alias_replica.result
+++ b/mysql-test/suite/rpl/r/rpl_slave_alias_replica.result
@@ -30,6 +30,7 @@ include/wait_for_slave_io_to_stop.inc
include/wait_for_slave_sql_to_stop.inc
"Command: RESET SLAVE ALL --> RESET REPLICA ALL"
RESET REPLICA ALL;
+set @@global.gtid_slave_pos= "";
connection master;
RESET MASTER;
CREATE TABLE t(f INT) ENGINE=INNODB;
diff --git a/mysql-test/suite/rpl/r/rpl_slave_max_statement_time.result b/mysql-test/suite/rpl/r/rpl_slave_max_statement_time.result
new file mode 100644
index 00000000000..0314797f6be
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_slave_max_statement_time.result
@@ -0,0 +1,170 @@
+include/master-slave.inc
+[connection master]
+#
+# Set up
+#
+connection master;
+SET STATEMENT sql_log_bin=0 FOR CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format");
+SET STATEMENT sql_log_bin=0 FOR CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format");
+connection slave;
+SET STATEMENT sql_log_bin=0 FOR CALL mtr.add_suppression("Slave log event execution was interrupted");
+SET STATEMENT sql_log_bin=0 FOR CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format");
+SET @save_slave_max_statement_time=@@GLOBAL.slave_max_statement_time;
+#
+# Test Case 1) Using a serial slave, the SQL thread should time out when
+# its underlying event executes for longer than @@slave_max_statement_time.
+#
+connection master;
+create table t1(a int not null auto_increment, b int, primary key(a)) engine=InnoDB;
+include/save_master_gtid.inc
+connection slave;
+include/sync_with_master_gtid.inc
+include/stop_slave.inc
+SET @old_slave_max_statement_time=@@GLOBAL.slave_max_statement_time;
+SET GLOBAL slave_max_statement_time=0.75;
+connection master;
+# Long running command due to a lock conflict
+INSERT INTO t1(b) VALUES (1);
+include/save_master_gtid.inc
+connection slave1;
+BEGIN;
+INSERT INTO t1(b) VALUES (1);
+connection slave;
+# Starting slave to receive event which will take longer to execute
+# than slave_max_statement_time
+START SLAVE;
+include/wait_for_slave_sql_error.inc [errno=4192]
+# Ensuring event was not processed..
+# ..success
+# Remove slave timeout and catch up to master
+SET GLOBAL slave_max_statement_time=0;
+connection slave1;
+ROLLBACK;
+include/start_slave.inc
+include/sync_with_master_gtid.inc
+# Test case cleanup
+connection master;
+DROP TABLE t1;
+include/save_master_gtid.inc
+connection slave;
+include/sync_with_master_gtid.inc
+include/stop_slave.inc
+SET GLOBAL slave_max_statement_time=@old_slave_max_statement_time;
+include/start_slave.inc
+#
+# Test Case 2) Using a parallel slave, a worker thread should time out
+# when its underlying event executes for longer than
+# @@slave_max_statement_time
+#
+include/stop_slave.inc
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
+SET GLOBAL slave_parallel_threads=2;
+SET GLOBAL slave_parallel_mode='optimistic';
+include/start_slave.inc
+connection master;
+create table t1(a int not null auto_increment, b int, primary key(a)) engine=InnoDB;
+include/save_master_gtid.inc
+connection slave;
+include/sync_with_master_gtid.inc
+include/stop_slave.inc
+SET @old_slave_max_statement_time=@@GLOBAL.slave_max_statement_time;
+SET GLOBAL slave_max_statement_time=0.75;
+connection master;
+# Long running command due to a lock conflict
+INSERT INTO t1(b) VALUES (1);
+include/save_master_gtid.inc
+connection slave1;
+BEGIN;
+INSERT INTO t1(b) VALUES (1);
+connection slave;
+# Starting slave to receive event which will take longer to execute
+# than slave_max_statement_time
+START SLAVE;
+include/wait_for_slave_sql_error.inc [errno=4192]
+# Ensuring event was not processed..
+# ..success
+# Remove slave timeout and catch up to master
+SET GLOBAL slave_max_statement_time=0;
+connection slave1;
+ROLLBACK;
+include/start_slave.inc
+include/sync_with_master_gtid.inc
+# Test case cleanup
+connection master;
+DROP TABLE t1;
+include/save_master_gtid.inc
+connection slave;
+include/sync_with_master_gtid.inc
+include/stop_slave.inc
+SET GLOBAL slave_max_statement_time=@old_slave_max_statement_time;
+include/start_slave.inc
+include/stop_slave.inc
+SET GLOBAL slave_parallel_mode=@old_parallel_mode;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+#
+# Test Case 3) Load-based log events (from LOAD DATA INFILE) should time
+# out if their execution time exceeds @@slave_max_statement_time
+#
+connection master;
+create table t1(a int not null auto_increment, b int, primary key(a)) engine=InnoDB;
+include/save_master_gtid.inc
+connection slave;
+include/sync_with_master_gtid.inc
+include/stop_slave.inc
+SET @old_slave_max_statement_time=@@GLOBAL.slave_max_statement_time;
+SET GLOBAL slave_max_statement_time=0.75;
+connection master;
+# Long running command due to a lock conflict
+load data infile '../../std_data/rpl_loaddata.dat' into table t1;
+include/save_master_gtid.inc
+connection slave1;
+BEGIN;
+INSERT INTO t1(b) VALUES (1);
+connection slave;
+# Starting slave to receive event which will take longer to execute
+# than slave_max_statement_time
+START SLAVE;
+include/wait_for_slave_sql_error.inc [errno=4192]
+# Ensuring event was not processed..
+# ..success
+# Remove slave timeout and catch up to master
+SET GLOBAL slave_max_statement_time=0;
+connection slave1;
+ROLLBACK;
+include/start_slave.inc
+include/sync_with_master_gtid.inc
+# Test case cleanup
+connection master;
+DROP TABLE t1;
+include/save_master_gtid.inc
+connection slave;
+include/sync_with_master_gtid.inc
+include/stop_slave.inc
+SET GLOBAL slave_max_statement_time=@old_slave_max_statement_time;
+include/start_slave.inc
+#
+# Test Case 4) Locally executed long running statements should not time
+# out due to @@slave_max_statement_time
+#
+connection slave;
+include/stop_slave.inc
+SET @old_slave_max_statement_time=@@GLOBAL.slave_max_statement_time;
+SET @old_gtid_domain_id=@@GLOBAL.gtid_domain_id;
+SET @@GLOBAL.slave_max_statement_time=0.75;
+SET @@GLOBAL.gtid_domain_id=1;
+include/start_slave.inc
+CREATE TABLE t2 (a int);
+SET STATEMENT sql_log_bin=0 FOR INSERT INTO t2 SELECT SLEEP(1);
+DROP TABLE t2;
+include/stop_slave.inc
+SET GLOBAL gtid_domain_id=@old_gtid_domain_id;
+SET GLOBAL slave_max_statement_time=@old_slave_max_statement_time;
+include/start_slave.inc
+# Cleanup
+include/stop_slave.inc
+SET GLOBAL slave_max_statement_time=@save_slave_max_statement_time;
+include/start_slave.inc
+include/rpl_end.inc
+# End of rpl_slave_max_statement_time.test
diff --git a/mysql-test/suite/rpl/r/rpl_slave_skip.result b/mysql-test/suite/rpl/r/rpl_slave_skip.result
index b9fe6842a11..8896199f499 100644
--- a/mysql-test/suite/rpl/r/rpl_slave_skip.result
+++ b/mysql-test/suite/rpl/r/rpl_slave_skip.result
@@ -63,7 +63,7 @@ c d
3 27
STOP SLAVE;
include/wait_for_slave_to_stop.inc
-RESET SLAVE;
+include/reset_slave.inc
connection master;
RESET MASTER;
SET SESSION BINLOG_FORMAT=STATEMENT;
diff --git a/mysql-test/suite/rpl/r/rpl_sp.result b/mysql-test/suite/rpl/r/rpl_sp.result
index 0bb3d9dc52a..55a826b3213 100644
--- a/mysql-test/suite/rpl/r/rpl_sp.result
+++ b/mysql-test/suite/rpl/r/rpl_sp.result
@@ -784,7 +784,7 @@ DELIMITER /*!*/;
ROLLBACK/*!*/;
SET TIMESTAMP=t/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=1/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
diff --git a/mysql-test/suite/rpl/r/rpl_start_alter_mysqlbinlog_1.result b/mysql-test/suite/rpl/r/rpl_start_alter_mysqlbinlog_1.result
index e008bbc81a7..2c3b694c45d 100644
--- a/mysql-test/suite/rpl/r/rpl_start_alter_mysqlbinlog_1.result
+++ b/mysql-test/suite/rpl/r/rpl_start_alter_mysqlbinlog_1.result
@@ -5,6 +5,8 @@ set global binlog_alter_two_phase=true;
connection 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
set global gtid_strict_mode=1;
# Legacy Master Slave
connect master_node,127.0.0.1,root,,$db_name, $M_port;
diff --git a/mysql-test/suite/rpl/r/rpl_start_alter_options.result b/mysql-test/suite/rpl/r/rpl_start_alter_options.result
index 30854b12be1..4c6135aaf5e 100644
--- a/mysql-test/suite/rpl/r/rpl_start_alter_options.result
+++ b/mysql-test/suite/rpl/r/rpl_start_alter_options.result
@@ -3,6 +3,8 @@ 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;
@@ -94,6 +96,8 @@ 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;
@@ -185,6 +189,8 @@ 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;
@@ -315,6 +321,8 @@ 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;
@@ -406,6 +414,8 @@ 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;
diff --git a/mysql-test/suite/rpl/r/rpl_start_alter_restart_master.result b/mysql-test/suite/rpl/r/rpl_start_alter_restart_master.result
index a2aba33aee0..2b53fde52a7 100644
--- a/mysql-test/suite/rpl/r/rpl_start_alter_restart_master.result
+++ b/mysql-test/suite/rpl/r/rpl_start_alter_restart_master.result
@@ -1,6 +1,10 @@
include/master-slave.inc
[connection master]
connection slave;
+include/stop_slave.inc
+CHANGE MASTER TO MASTER_USE_GTID=NO;
+include/start_slave.inc
+connection slave;
SET @old_debug_slave= @@global.debug;
stop slave;
SET GLOBAL slave_parallel_threads=4;
diff --git a/mysql-test/suite/rpl/r/rpl_stm_000001.result b/mysql-test/suite/rpl/r/rpl_stm_000001.result
index 9ef2ca3bc53..5d6d61d175b 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_000001.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_000001.result
@@ -49,7 +49,7 @@ connection master;
reset master;
connection slave;
stop slave;
-reset slave;
+include/reset_slave.inc
connection master;
connection slave;
lock tables t1 read;
diff --git a/mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result b/mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result
index 944ad9331ad..e94e097f41f 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result
@@ -1,5 +1,10 @@
include/master-slave.inc
[connection master]
+connection slave;
+include/stop_slave.inc
+CHANGE MASTER TO MASTER_USE_GTID=NO;
+include/start_slave.inc
+connection master;
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
call mtr.add_suppression("Write to binary log failed: Multi-row statements required more than .max_binlog_stmt_cache_size");
call mtr.add_suppression("Write to binary log failed: Multi-statement transaction required more than .max_binlog_cache_size");
diff --git a/mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result b/mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result
index 660c736795b..8ce08e9d550 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result
@@ -1,5 +1,10 @@
include/master-slave.inc
[connection master]
+connection slave;
+include/stop_slave.inc
+change master to master_use_gtid=no;
+include/start_slave.inc
+connection master;
create table t1 (a int) ENGINE=MyISAM;
insert into t1 values (10);
create table t2 (a int) ENGINE=MyISAM;
diff --git a/mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result b/mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result
index f510eae74f8..a437b66dd78 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result
@@ -74,7 +74,9 @@ load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1;
connection slave;
include/wait_for_slave_sql_error.inc [errno=1062]
stop slave;
-reset 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-14. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
include/check_slave_no_error.inc
connection master;
reset master;
diff --git a/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result b/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result
index 1ba2d1b624b..0a365b30b38 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result
@@ -7,7 +7,7 @@ include/stop_slave.inc
change master to master_user='test';
Master_User = 'test'
Master_Host = '127.0.0.1'
-reset slave;
+include/reset_slave.inc
Master_User = 'test'
Master_Host = '127.0.0.1'
change master to master_user='root';
@@ -15,13 +15,13 @@ include/start_slave.inc
Master_User = 'root'
Master_Host = '127.0.0.1'
include/stop_slave.inc
-reset slave;
+include/reset_slave.inc
include/start_slave.inc
connection master;
create temporary table t1 (a int);
connection slave;
include/stop_slave.inc
-reset slave;
+include/reset_slave.inc
include/start_slave.inc
show status like 'slave_open_temp_tables';
Variable_name Value
@@ -30,7 +30,7 @@ connection master;
drop temporary table if exists t1;
connection slave;
include/stop_slave.inc
-reset slave;
+include/reset_slave.inc
include/check_slave_no_error.inc
change master to master_user='impossible_user_name';
start slave;
@@ -44,13 +44,14 @@ change master to master_user='impossible_user_name';
start slave;
include/wait_for_slave_io_error.inc [errno=1045]
include/stop_slave_sql.inc
-reset slave;
+include/reset_slave.inc
include/check_slave_no_error.inc
change master to master_user='root';
-reset slave;
+include/reset_slave.inc
include/start_slave.inc
include/stop_slave.inc
reset slave all;
+set @@global.gtid_slave_pos= "";
start slave;
ERROR HY000: Misconfigured slave: MASTER_HOST was not set; Fix in config file or with CHANGE MASTER TO
CHANGE MASTER TO MASTER_HOST= 'MASTER_HOST', MASTER_USER= 'MASTER_USER', MASTER_PORT= MASTER_PORT;
diff --git a/mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result b/mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result
index 992e6c2181b..40910b8c1f2 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result
@@ -104,13 +104,15 @@ connection master;
RESET MASTER;
connection slave;
include/stop_slave.inc
-CHANGE MASTER TO master_log_pos=MASTER_POS;
+CHANGE MASTER TO master_log_pos=MASTER_POS, master_use_gtid=no;
START SLAVE;
include/wait_for_slave_param.inc [Last_IO_Errno]
Last_IO_Errno = '1236'
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position; the first event 'master-bin.000001' at XXX, the last event read from 'master-bin.000001' at XXX, the last byte read from 'master-bin.000001' at XXX.''
include/stop_slave.inc
RESET SLAVE;
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
connection master;
RESET MASTER;
connection slave;
diff --git a/mysql-test/suite/rpl/r/rpl_stm_until.result b/mysql-test/suite/rpl/r/rpl_stm_until.result
index 65f188c11a0..b51e3d847e3 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_until.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_until.result
@@ -69,7 +69,9 @@ Note 1254 Slave is already running
connection slave;
include/stop_slave.inc
drop table if exists t1;
-reset slave;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root';
connection master;
drop table if exists t1;
diff --git a/mysql-test/suite/rpl/r/rpl_stop_slave.result b/mysql-test/suite/rpl/r/rpl_stop_slave.result
index a4dbf13290a..50a52d4d4b3 100644
--- a/mysql-test/suite/rpl/r/rpl_stop_slave.result
+++ b/mysql-test/suite/rpl/r/rpl_stop_slave.result
@@ -1,5 +1,10 @@
include/master-slave.inc
[connection master]
+connection slave;
+include/stop_slave.inc
+CHANGE MASTER TO MASTER_USE_GTID=NO;
+include/start_slave.inc
+connection master;
# BUG#56118 STOP SLAVE does not wait till trx with CREATE TMP TABLE ends
#
diff --git a/mysql-test/suite/rpl/r/rpl_timestamp.result b/mysql-test/suite/rpl/r/rpl_timestamp.result
index 5e38de40b42..d287bad4492 100644
--- a/mysql-test/suite/rpl/r/rpl_timestamp.result
+++ b/mysql-test/suite/rpl/r/rpl_timestamp.result
@@ -7,15 +7,15 @@ create table t1 (f1 timestamp, f2 timestamp);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f1` timestamp NULL DEFAULT NULL,
- `f2` timestamp NULL DEFAULT NULL
+ `f1` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `f2` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
connection slave;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f1` timestamp NULL DEFAULT NULL,
- `f2` timestamp NULL DEFAULT NULL
+ `f1` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `f2` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
connection master;
drop table t1;
@@ -28,7 +28,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1656940000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
diff --git a/mysql-test/suite/rpl/r/rpl_trigger.result b/mysql-test/suite/rpl/r/rpl_trigger.result
index 06d5a3c895f..f4f700ac477 100644
--- a/mysql-test/suite/rpl/r/rpl_trigger.result
+++ b/mysql-test/suite/rpl/r/rpl_trigger.result
@@ -1,5 +1,9 @@
include/master-slave.inc
[connection master]
+connection slave;
+include/stop_slave.inc
+CHANGE MASTER TO MASTER_USE_GTID=NO;
+include/start_slave.inc
connection master;
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
@@ -961,7 +965,9 @@ include/rpl_stop_server.inc [server_number=1]
include/rpl_start_server.inc [server_number=1]
--> Master binlog: Server ver: 5.0.16-debug-log, Binlog ver: 4
connection slave;
-RESET SLAVE;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
START SLAVE;
SELECT MASTER_POS_WAIT('master-bin.000001', 513) >= 0;
MASTER_POS_WAIT('master-bin.000001', 513) >= 0
@@ -992,7 +998,9 @@ DROP TRIGGER trg1;
DROP TABLE t1;
DROP TABLE t2;
STOP SLAVE;
-RESET SLAVE;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
connection master;
SHOW TABLES LIKE 't_';
Tables_in_test (t_)
@@ -1083,7 +1091,12 @@ drop table t1;
connection slave;
connection master;
include/rpl_reset.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
connection slave;
+include/stop_slave.inc
+CHANGE MASTER TO MASTER_USE_GTID=NO;
+include/start_slave.inc
connection master;
create table t1 ( f int ) engine = innodb;
create table log ( r int ) engine = myisam;
diff --git a/mysql-test/suite/rpl/r/rpl_upgrade_master_info.result b/mysql-test/suite/rpl/r/rpl_upgrade_master_info.result
index ffa041efd27..e58ea5eb0f2 100644
--- a/mysql-test/suite/rpl/r/rpl_upgrade_master_info.result
+++ b/mysql-test/suite/rpl/r/rpl_upgrade_master_info.result
@@ -4,6 +4,8 @@ include/master-slave.inc
connection 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/rpl_stop_server.inc [server_number=2]
include/rpl_start_server.inc [server_number=2]
connection master;
diff --git a/mysql-test/suite/rpl/r/rpl_using_gtid_default.result b/mysql-test/suite/rpl/r/rpl_using_gtid_default.result
new file mode 100644
index 00000000000..e077bcd91a4
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_using_gtid_default.result
@@ -0,0 +1,144 @@
+include/master-slave.inc
+[connection master]
+#
+# Slave default configuration should be Slave_Pos
+connection slave;
+#
+# Ensure that a slave configured with Using_Gtid=Slave_Pos will remain
+# as Slave_Pos after RESET SLAVE
+include/stop_slave.inc
+RESET SLAVE;
+# No warning should be given because Slave_Pos never changed
+SHOW WARNINGS;
+Level Code Message
+include/start_slave.inc
+#
+# Ensure that a slave configured with Using_Gtid=No will revert to its
+# default of Slave_Pos after RESET SLAVE for a master which supports
+# GTIDs
+include/stop_slave.inc
+CHANGE MASTER TO MASTER_USE_GTID=NO;
+include/start_slave.inc
+include/stop_slave.inc
+RESET SLAVE;
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
+# A notification that Using_Gtid was reverted should exist
+SHOW WARNINGS;
+Level Code Message
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
+include/start_slave.inc
+# Clear SHOW WARNINGS
+#
+# If the primary does not support GTIDs (version < 10), the replica
+# should fall back to Using_Gtid=No on slave start, and should not
+# revert Using_Gtid to Slave_Pos after RESET SLAVE
+include/stop_slave.inc
+RESET SLAVE ALL;
+CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=1;
+SET @saved_dbug= @@GLOBAL.debug_dbug;
+set @@global.debug_dbug= "d,mock_mariadb_primary_v5_in_get_master_version";
+include/start_slave.inc
+# Replica should detect at start that the primary does not support GTIDs
+# and fall-back to Using_Gtid=No
+# Replica should have an informational message stating it is falling
+# back to Using_Gtid=No
+FOUND 1 /Falling back to Using_Gtid=No because master does not support GTIDs/ in mysqld.2.err
+include/stop_slave.inc
+RESET SLAVE;
+# Replica should know that the primary does not support GTIDs and
+# preserve Using_Gtid=No
+# 'No' was not reverted and therefore no note should be added
+SHOW WARNINGS;
+Level Code Message
+set @@global.debug_dbug= @saved_dbug;
+include/start_slave.inc
+#
+# Ensure that a slave configured with Using_Gtid=Current_Pos will revert
+# 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;
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'Current_Pos' to 'Slave_Pos'
+# A notification that Using_Gtid was reverted should exist
+SHOW WARNINGS;
+Level Code Message
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'Current_Pos' to 'Slave_Pos'
+include/start_slave.inc
+# Clear SHOW WARNINGS
+# The MTR include file rpl_change_topology.inc should implicitly set
+# MASTER_USE_GTID=NO when provided with $rpl_master_log_file. Note that
+# this will switch master and slave roles.
+connection slave;
+include/stop_slave.inc
+include/rpl_change_topology.inc [new topology=2->1]
+# connection 'master' is the slave in this comparison
+connection master;
+# Validating Using_Gtid=No..
+# ..success
+include/rpl_change_topology.inc [new topology=1->2]
+# connection 'slave' is back to slave role
+connection slave;
+# Validating Using_Gtid=Slave_Pos..
+# ..success
+include/start_slave.inc
+#
+# The MTR include file reset_slave.inc should keep/delete GTID state
+# when reset_slave_keep_gtid_state is set, respectively.
+#
+connection master;
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1);
+DROP TABLE t1;
+include/save_master_gtid.inc
+connection slave;
+include/sync_with_master_gtid.inc
+include/stop_slave.inc
+# Tagging gtid_slave_pos before reset_slave.inc as old_slave_pos
+# Using reset_slave_keep_gtid_state=1 should preserve GTID state
+include/reset_slave.inc
+# Tagging gtid_slave_pos after reset_slave.inc as new_slave_pos
+# Validating old_slave_pos == new_slave_pos..
+# ..success
+# Using reset_slave_keep_gtid_state=0 should empty GTID state
+include/reset_slave.inc
+# Tagging gtid_slave_pos as new_slave_pos
+# Validating new_slave_pos is empty..
+# ..success
+set global gtid_slave_pos="old_slave_pos";
+include/start_slave.inc
+#
+# A replica issued CHANGE MASTER TO specified with log coordinates but
+# not master_use_gtid=no should warn the user that Using_Gtid is being
+# changed to No.
+#
+connection slave;
+include/stop_slave.inc
+CHANGE MASTER TO master_log_pos=io_log_pos, master_log_file='io_log_file';
+Warnings:
+Note 4190 CHANGE MASTER TO is implicitly changing the value of 'Using_Gtid' from 'Slave_Pos' to 'No'
+include/start_slave.inc
+#
+# A replica issued CHANGE MASTER TO specified with log coordinates and
+# master_use_gtid=Slave_Pos should warn the user that the log
+# coordinates will be ignored.
+#
+connection slave;
+include/stop_slave.inc
+CHANGE MASTER TO master_log_pos=io_log_pos, master_log_file='io_log_file', master_use_gtid=Slave_Pos;
+Warnings:
+Note 1618 <MASTER_LOG_FILE> option ignored
+Note 1618 <MASTER_LOG_POS> option ignored
+CHANGE MASTER TO relay_log_pos=relay_log_pos, relay_log_file='relay_log_file', master_use_gtid=Slave_Pos;
+Warnings:
+Note 1618 <RELAY_LOG_FILE> option ignored
+Note 1618 <RELAY_LOG_POS> option ignored
+include/start_slave.inc
+include/rpl_end.inc
+#
+# End of rpl_using_gtid_default.test
diff --git a/mysql-test/suite/rpl/r/rpl_xa_gap_lock.result b/mysql-test/suite/rpl/r/rpl_xa_gap_lock.result
index cb760abe2d2..97e8f2105c4 100644
--- a/mysql-test/suite/rpl/r/rpl_xa_gap_lock.result
+++ b/mysql-test/suite/rpl/r/rpl_xa_gap_lock.result
@@ -38,7 +38,7 @@ include/diff_tables.inc [master:test.t1, slave:test.t1]
include/diff_tables.inc [master:test.t2, slave:test.t2]
DROP TABLE t2, t1;
connection slave;
-CHANGE MASTER TO MASTER_LOG_FILE='LOG_FILE', MASTER_LOG_POS=LOG_POS;
+CHANGE MASTER TO MASTER_LOG_FILE='LOG_FILE', MASTER_LOG_POS=LOG_POS, MASTER_USE_GTID=NO;
SET @@GLOBAL.innodb_limit_optimistic_insert_debug = @saved_innodb_limit_optimistic_insert_debug;
include/start_slave.inc
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/semisync_future-7591.result b/mysql-test/suite/rpl/r/semisync_future-7591.result
index 9dc0ee51e53..80414ac1f8d 100644
--- a/mysql-test/suite/rpl/r/semisync_future-7591.result
+++ b/mysql-test/suite/rpl/r/semisync_future-7591.result
@@ -6,7 +6,7 @@ set global rpl_semi_sync_master_enabled = ON;
connection slave;
include/stop_slave.inc
set global rpl_semi_sync_slave_enabled = ON;
-change master to master_log_file='master-bin.000002', master_log_pos = 320;
+change master to master_log_file='master-bin.000002', master_log_pos = 320, master_use_gtid=no;
start slave;
include/wait_for_slave_io_error.inc [errno=1236]
connection master;
@@ -14,7 +14,9 @@ insert into t1 values (1);
reset master;
connection slave;
include/stop_slave.inc
-reset slave;
+include/reset_slave.inc
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
include/start_slave.inc
set global rpl_semi_sync_slave_enabled = OFF;
connection master;