diff options
author | Sujatha <sujatha.sivakumar@mariadb.com> | 2021-08-24 17:15:04 +0530 |
---|---|---|
committer | Sujatha <sujatha.sivakumar@mariadb.com> | 2021-09-15 10:39:43 +0530 |
commit | 47476b09638f6c3a57ee40d318be7a98cda9c83d (patch) | |
tree | 2bd24c39bf54a4e222a4c3a513a7e572da228b9a | |
parent | 329d370f2d6af13cee89bc2c8db0f5915dcbfd4a (diff) | |
download | mariadb-git-bb-10.6-sujatha.tar.gz |
MDEV-20122: With MASTER_USE_GTID=current_pos, slave's I/O thread only checks gtid_current_pos when thread is first startedbb-10.6-sujatha
Deprecate master_use_gtid=current_pos
27 files changed, 110 insertions, 0 deletions
diff --git a/mysql-test/suite/binlog_encryption/rpl_gtid_basic.result b/mysql-test/suite/binlog_encryption/rpl_gtid_basic.result index 4e17669605f..15384207f63 100644 --- a/mysql-test/suite/binlog_encryption/rpl_gtid_basic.result +++ b/mysql-test/suite/binlog_encryption/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 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 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 include/start_slave.inc include/sync_with_master_gtid.inc SELECT * FROM t2 ORDER BY a; diff --git a/mysql-test/suite/engines/funcs/r/rpl_change_master.result b/mysql-test/suite/engines/funcs/r/rpl_change_master.result index 48cec72d917..457fd83dc2a 100644 --- a/mysql-test/suite/engines/funcs/r/rpl_change_master.result +++ b/mysql-test/suite/engines/funcs/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 +CHANGE MASTER TO MASTER_USE_GTID=SLAVE_POS; include/rpl_end.inc diff --git a/mysql-test/suite/multi_source/gtid.result b/mysql-test/suite/multi_source/gtid.result index 0ed1062b70f..be62a33ed66 100644 --- a/mysql-test/suite/multi_source/gtid.result +++ b/mysql-test/suite/multi_source/gtid.result @@ -48,7 +48,11 @@ INSERT INTO t2 VALUES (2, "switch1"); INSERT INTO t3 VALUES (202, "switch1 b"); connection slave2; CHANGE MASTER 'slave1' TO master_port=MYPORT_1, master_host='127.0.0.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 CHANGE MASTER 'slave2' TO master_port=MYPORT_2, master_host='127.0.0.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 SET default_master_connection = 'slave1'; START SLAVE; include/wait_for_slave_to_start.inc @@ -76,6 +80,8 @@ connection slave2; include/sync_with_master_gtid.inc connection slave1; CHANGE MASTER TO master_port=MYPORT_4, master_host='127.0.0.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 START SLAVE; SELECT * FROM t1 ORDER BY a; a b 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..e18a89080c5 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 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_change_master.result b/mysql-test/suite/rpl/r/rpl_change_master.result index 48cec72d917..457fd83dc2a 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 +CHANGE MASTER TO MASTER_USE_GTID=SLAVE_POS; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_gtid_basic.result b/mysql-test/suite/rpl/r/rpl_gtid_basic.result index 32df09789cc..eb846745307 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 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 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 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..5e14213c7da 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 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 54156685806..31f9e689d41 100644 --- a/mysql-test/suite/rpl/r/rpl_gtid_errorhandling.result +++ b/mysql-test/suite/rpl/r/rpl_gtid_errorhandling.result @@ -74,6 +74,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 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..e5838f8ed50 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 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..6a77d532f1b 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 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 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 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 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 include/start_slave.inc SELECT * FROM t1 ORDER BY a; a diff --git a/mysql-test/suite/rpl/r/rpl_gtid_mdev4473.result b/mysql-test/suite/rpl/r/rpl_gtid_mdev4473.result index 5c80e64dc9b..39e7e9a0c6a 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 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 include/start_slave.inc select * from t1 order by n; n @@ -56,11 +60,15 @@ reset slave all; 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 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 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..9b8a1916262 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 START SLAVE; connection server_2; INSERT INTO t1 VALUES (11); @@ -72,6 +74,8 @@ 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 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_misc.result b/mysql-test/suite/rpl/r/rpl_gtid_misc.result index a5c61759ed6..bdc07d5956c 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 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..b7e8bac2fec 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 START SLAVE; include/wait_for_slave_to_start.inc connection server_2; @@ -52,6 +54,8 @@ 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 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..279783f0864 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 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..ced329f0aef 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 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..146d0df8205 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 include/start_slave.inc SELECT * FROM t1; a @@ -34,6 +36,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 START SLAVE; include/wait_for_slave_io_error.inc [errno=1236] include/stop_slave.inc @@ -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 include/start_slave.inc include/sync_with_master_gtid.inc SELECT * FROM t1 ORDER by a; @@ -96,6 +102,8 @@ 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 include/start_slave.inc connection server_1; CREATE TABLE t1 (a INT PRIMARY KEY); @@ -151,6 +159,8 @@ 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 include/start_slave.inc connection server_1; INSERT INTO t1 VALUES(3); 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..883f9c768c4 100644 --- a/mysql-test/suite/rpl/r/rpl_gtid_stop_start.result +++ b/mysql-test/suite/rpl/r/rpl_gtid_stop_start.result @@ -8,6 +8,8 @@ include/stop_slave.inc Master_Log_File = 'master-bin.000001' Using_Gtid = 'No' 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 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 2295aad34ac..8b99c0a59c4 100644 --- a/mysql-test/suite/rpl/r/rpl_gtid_until.result +++ b/mysql-test/suite/rpl/r/rpl_gtid_until.result @@ -26,6 +26,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 connection server_1; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES(1); @@ -212,6 +214,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 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_mdev6386.result b/mysql-test/suite/rpl/r/rpl_mdev6386.result index d0e5144857a..8c376bfa991 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 Contents on slave before: SELECT * FROM t1 ORDER BY a; a b diff --git a/mysql-test/suite/rpl/r/rpl_parallel_mdev6589.result b/mysql-test/suite/rpl/r/rpl_parallel_mdev6589.result index 47cdb3496da..f56fd88c6da 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 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..f438ced5439 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 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 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 52efed22541..19b787ff61b 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 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_connect_config.result b/mysql-test/suite/rpl/r/rpl_perfschema_connect_config.result index 4ace84ffac4..38b6c1727d1 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 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_upgrade_master_info.result b/mysql-test/suite/rpl/r/rpl_upgrade_master_info.result index ffa041efd27..ce788022114 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 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/t/rpl_change_master.test b/mysql-test/suite/rpl/t/rpl_change_master.test index 9ab49a585e6..010dbf6ffe6 100644 --- a/mysql-test/suite/rpl/t/rpl_change_master.test +++ b/mysql-test/suite/rpl/t/rpl_change_master.test @@ -108,4 +108,10 @@ CHANGE MASTER TO MASTER_USER='root', MASTER_SSL=0, MASTER_SSL_CA='', MASTER_SSL_ MASTER_SSL_KEY='', MASTER_SSL_CRL='', MASTER_SSL_CRLPATH=''; CHANGE MASTER TO MASTER_USER='root', MASTER_PASSWORD='', MASTER_SSL=0; + +# MDEV-20122: With MASTER_USE_GTID=current_pos, slave's I/O thread only checks gtid_current_pos when thread is first started +--echo "Usage of CURRENT_POS in CHANGE MASTER MASTER_USE_GTID is dreprecated. +CHANGE MASTER TO MASTER_USE_GTID=CURRENT_POS; +CHANGE MASTER TO MASTER_USE_GTID=SLAVE_POS; + --source include/rpl_end.inc diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 7bcff12a735..28cd2575e7e 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -3812,7 +3812,13 @@ bool change_master(THD* thd, Master_info* mi, bool *master_info_added) if (lex_mi->use_gtid_opt == LEX_MASTER_INFO::LEX_GTID_SLAVE_POS) mi->using_gtid= Master_info::USE_GTID_SLAVE_POS; else if (lex_mi->use_gtid_opt == LEX_MASTER_INFO::LEX_GTID_CURRENT_POS) + { mi->using_gtid= Master_info::USE_GTID_CURRENT_POS; + push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, + ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT, + ER_THD(thd, ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT), + "master_use_gtid=current_pos"); + } else if (lex_mi->use_gtid_opt == LEX_MASTER_INFO::LEX_GTID_NO || lex_mi->log_file_name || lex_mi->pos || lex_mi->relay_log_name || lex_mi->relay_log_pos) |