Skip to content

Commit

Permalink
MDEV-28839: remove current_pos where not intentionally being tested
Browse files Browse the repository at this point in the history
Task:
=====
Update tests to reflect MDEV-20122, deprecation of master_use_gtid=current_pos.
Change Master (CM) statements were either removed or modified with
current_pos --> slave_pos based on original intention of the test.
Reviewed by:
============
Brandon Nesterenko <brandon.nesterenko@mariadb.com>
  • Loading branch information
mariadb-AngeliqueSklavounos committed Feb 13, 2023
1 parent 25a8bdd commit 7aace5d
Show file tree
Hide file tree
Showing 38 changed files with 50 additions and 171 deletions.
12 changes: 3 additions & 9 deletions mysql-test/suite/multi_source/gtid.result
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,8 @@ connection master2;
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. Please use master_demote_to_slave=1 instead
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. Please use master_demote_to_slave=1 instead
CHANGE MASTER 'slave1' TO master_port=MYPORT_1, master_host='127.0.0.1', master_user='root';
CHANGE MASTER 'slave2' TO master_port=MYPORT_2, master_host='127.0.0.1', master_user='root';
SET default_master_connection = 'slave1';
START SLAVE;
include/wait_for_slave_to_start.inc
Expand All @@ -79,9 +75,7 @@ INSERT INTO t3 VALUES (204, "switch 3 b");
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. Please use master_demote_to_slave=1 instead
CHANGE MASTER TO master_port=MYPORT_4, master_host='127.0.0.1', master_user='root';
START SLAVE;
SELECT * FROM t1 ORDER BY a;
a b
Expand Down
6 changes: 3 additions & 3 deletions mysql-test/suite/multi_source/gtid.test
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ INSERT INTO t3 VALUES (202, "switch1 b");

--connection slave2
--replace_result $SERVER_MYPORT_1 MYPORT_1
eval CHANGE MASTER 'slave1' TO master_port=$SERVER_MYPORT_1, master_host='127.0.0.1', master_user='root', master_use_gtid=current_pos;
eval CHANGE MASTER 'slave1' TO master_port=$SERVER_MYPORT_1, master_host='127.0.0.1', master_user='root';
--replace_result $SERVER_MYPORT_2 MYPORT_2
eval CHANGE MASTER 'slave2' TO master_port=$SERVER_MYPORT_2, master_host='127.0.0.1', master_user='root', master_use_gtid=current_pos;
eval CHANGE MASTER 'slave2' TO master_port=$SERVER_MYPORT_2, master_host='127.0.0.1', master_user='root';
SET default_master_connection = 'slave1';
START SLAVE;
--source include/wait_for_slave_to_start.inc
Expand Down Expand Up @@ -125,7 +125,7 @@ INSERT INTO t3 VALUES (204, "switch 3 b");

--connection slave1
--replace_result $SERVER_MYPORT_4 MYPORT_4
eval CHANGE MASTER TO master_port=$SERVER_MYPORT_4, master_host='127.0.0.1', master_user='root', master_use_gtid=current_pos;
eval CHANGE MASTER TO master_port=$SERVER_MYPORT_4, master_host='127.0.0.1', master_user='root';
START SLAVE;
--let $wait_condition= SELECT (SELECT COUNT(*) FROM t1)=3 AND (SELECT COUNT(*) FROM t2)=4 AND (SELECT COUNT(*) FROM t3)=7
--source include/wait_condition.inc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ connection master;
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
CHANGE MASTER TO MASTER_USE_GTID=slave_pos;
include/start_slave.inc
connection master;
"Test Case 1: Start binlog_dump to slave_server(#), pos(master-bin.000001, ###), using_gtid(1), gtid('')"
Expand Down
4 changes: 1 addition & 3 deletions mysql-test/suite/rpl/r/rpl_gtid_crash.result
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ call mtr.add_suppression('Master command COM_REGISTER_SLAVE failed: failed regis
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
MASTER_USE_GTID=SLAVE_POS;
connection server_1;
INSERT INTO t1 VALUES (2,1);
INSERT INTO t1 VALUES (3,1);
Expand Down
6 changes: 2 additions & 4 deletions mysql-test/suite/rpl/r/rpl_gtid_excess_initial_delay.result
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ include/master-slave.inc
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
CHANGE MASTER TO MASTER_DELAY= 10;
include/start_slave.inc
connection master;
INSERT INTO t1 VALUES (1);
Expand All @@ -16,7 +14,7 @@ connection slave;
# Asserted this: One row shoule be found in table t1.
"======= Clean up ========"
STOP SLAVE;
CHANGE MASTER TO MASTER_USE_GTID=no, MASTER_DELAY=0;
CHANGE MASTER TO MASTER_DELAY=0;
START SLAVE;
connection master;
DROP TABLE t1;
Expand Down
18 changes: 1 addition & 17 deletions mysql-test/suite/rpl/r/rpl_gtid_master_promote.result
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,12 @@ RETURN s;
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;
Expand Down Expand Up @@ -347,9 +335,7 @@ a b
*** Now let the old master join up as slave. ***
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
master_user = "root", master_use_gtid = slave_pos, master_demote_to_slave=1;
include/start_slave.inc
SELECT * FROM t1 ORDER BY a;
a
Expand Down Expand Up @@ -387,8 +373,6 @@ 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
Expand Down
18 changes: 4 additions & 14 deletions mysql-test/suite/rpl/r/rpl_gtid_mdev4473.result
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ include/wait_for_slave_to_stop.inc
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
master_user='root', MASTER_USE_GTID=SLAVE_POS, master_demote_to_slave=1;
include/start_slave.inc
include/wait_for_slave_to_start.inc
connection server_2;
Expand All @@ -24,9 +22,7 @@ insert into t1 values (4);
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
MASTER_USE_GTID=SLAVE_POS;
include/start_slave.inc
select * from t1 order by n;
n
Expand Down Expand Up @@ -57,20 +53,14 @@ 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
master_user = 'root', MASTER_USE_GTID=SLAVE_POS, master_demote_to_slave=1;
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
MASTER_USE_GTID=SLAVE_POS;
include/start_slave.inc
connection server_1;
drop table t1;
Expand Down
3 changes: 0 additions & 3 deletions mysql-test/suite/rpl/r/rpl_gtid_misc.result
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ include/stop_slave.inc
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);
Expand Down
11 changes: 2 additions & 9 deletions mysql-test/suite/rpl/r/rpl_gtid_nobinlog.result
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ a b
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
master_user = 'root';
START SLAVE;
include/wait_for_slave_to_start.inc
connection server_2;
Expand All @@ -48,16 +46,11 @@ 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
CHANGE MASTER TO master_host = '127.0.0.1', master_port = MASTER_PORT;
START SLAVE;
include/sync_with_master_gtid.inc
SELECT * FROM t1 ORDER BY a;
Expand Down
6 changes: 0 additions & 6 deletions mysql-test/suite/rpl/r/rpl_gtid_reconnect.result
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
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);
FLUSH LOGS;
Expand Down
4 changes: 1 addition & 3 deletions mysql-test/suite/rpl/r/rpl_gtid_sort.result
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ SHOW VARIABLES LIKE 'gtid_binlog_state';
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
MASTER_USE_GTID=SLAVE_POS;
include/start_slave.inc
SHOW VARIABLES LIKE 'gtid_binlog_pos';
Variable_name Value
Expand Down
30 changes: 7 additions & 23 deletions mysql-test/suite/rpl/r/rpl_gtid_startpos.result
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
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
MASTER_USE_GTID=SLAVE_POS;
include/start_slave.inc
SELECT * FROM t1;
a
Expand All @@ -35,9 +33,7 @@ master-bin.000003 #
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
MASTER_USE_GTID=SLAVE_POS;
START SLAVE;
include/wait_for_slave_io_error.inc [errno=1236]
include/stop_slave.inc
Expand All @@ -59,9 +55,7 @@ include/save_master_gtid.inc
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
MASTER_USE_GTID=SLAVE_POS;
include/start_slave.inc
include/sync_with_master_gtid.inc
SELECT * FROM t1 ORDER by a;
Expand Down Expand Up @@ -96,16 +90,12 @@ 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
CHANGE MASTER TO master_host='127.0.0.1', master_port=MASTER_PORT, master_user='root', master_use_gtid=slave_pos;
include/start_slave.inc
connection server_1;
CREATE TABLE t1 (a INT PRIMARY KEY);
Expand All @@ -129,8 +119,6 @@ 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
Expand Down Expand Up @@ -162,9 +150,7 @@ 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
CHANGE MASTER TO MASTER_USE_GTID=SLAVE_POS;
include/start_slave.inc
connection server_1;
INSERT INTO t1 VALUES(3);
Expand Down Expand Up @@ -223,9 +209,9 @@ include/sync_with_master_gtid.inc
SELECT * FROM t1;
a
10
SELECT 'Current_Pos' AS Using_Gtid;
SELECT 'Slave_Pos' AS Using_Gtid;
Using_Gtid
Current_Pos
Slave_Pos
SELECT '0-1-2' AS Gtid_Slave_Pos;
Gtid_Slave_Pos
0-1-2
Expand All @@ -252,8 +238,6 @@ 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= "";
Expand Down
3 changes: 0 additions & 3 deletions mysql-test/suite/rpl/r/rpl_gtid_stop_start.result
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ connection server_2;
include/stop_slave.inc
Master_Log_File = 'master-bin.000001'
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;
Expand Down
12 changes: 3 additions & 9 deletions mysql-test/suite/rpl/r/rpl_gtid_until.result
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ ERROR HY000: Slave is already running
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
CHANGE MASTER TO master_use_gtid=slave_pos;
connection server_1;
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES(1);
Expand Down Expand Up @@ -60,7 +58,7 @@ a
include/stop_slave.inc
START SLAVE UNTIL master_gtid_pos = "1-10-100,2-20-200,0-1-300";
include/wait_for_slave_to_start.inc
Using_Gtid = 'Current_Pos'
Using_Gtid = 'Slave_Pos'
Until_Condition = 'Gtid'
connection server_1;
INSERT INTO t1 VALUES (3);
Expand Down Expand Up @@ -205,8 +203,6 @@ 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;
Expand All @@ -219,9 +215,7 @@ RESET MASTER;
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
master_user = "root", master_use_gtid = slave_pos;
START SLAVE UNTIL master_gtid_pos = '0-1-2';
include/wait_for_slave_to_start.inc
connection server_1;
Expand Down
3 changes: 0 additions & 3 deletions mysql-test/suite/rpl/r/rpl_mdev6386.result
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ SET sql_log_bin= 0;
CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");
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
Expand Down
Loading

0 comments on commit 7aace5d

Please sign in to comment.