Debian Codegraph @

mysql-test/suite/rpl_gtid/t/rpl_gtid_deprecations.test

raw
1 --source include/not_rpl_gtid_only.inc
2 --source include/master-slave.inc
3
4 # Test has more than one channel, so cannot run with
5 # master-info-repository=FILE, relay-log-info-repository=FILE
6 --source include/have_slave_repository_type_table.inc
7
8 # no need to run multiple times
9 --source include/have_binlog_format_row.inc
10
11 #############################################################
12 # WL#10963 Deprecate IGNORE_SERVER_IDS when GTID_MODE=ON #
13 #############################################################
14
15 --source include/rpl_connection_slave.inc
16 --source include/stop_slave.inc
17
18 # assert that a warning is emited when setting ignore_server_ids
19 # and GTID_MODE=ON
20 CHANGE REPLICATION SOURCE TO IGNORE_SERVER_IDS=(1,2,3);
21
22 # create a second channel
23 CHANGE REPLICATION SOURCE TO SOURCE_HOST='dummy', IGNORE_SERVER_IDS=(1) FOR CHANNEL 'ch1';
24
25 # assert that warning is not emitted when gtid_mode != ON
26 CHANGE REPLICATION SOURCE TO SOURCE_AUTO_POSITION=0 FOR CHANNEL '';
27 SET @@global.gtid_mode=ON_PERMISSIVE;
28 SET @@global.gtid_mode=OFF_PERMISSIVE;
29 SET @@global.gtid_mode=OFF;
30 SET @@global.gtid_mode=OFF_PERMISSIVE;
31 SET @@global.gtid_mode=ON_PERMISSIVE;
32 CHANGE REPLICATION SOURCE TO SOURCE_AUTO_POSITION=1 FOR CHANNEL '';
33
34 # assert that a warning is emited when setting gtid_mode=on and
35 # IGNORE_SERVER_IDS is also set (and that we only get one warning
36 # even though there are two channels configured to ignore server
37 # ids).
38 SET @@global.gtid_mode=ON;
39
40 # assert that even if changing to GTID_MODE=ON again (no-op) we
41 # get the warning anyway
42 SET @@global.gtid_mode=ON;
43
44 # assert that no warning is emited when unsetting ignore_server_ids
45 # and GTID_MODE=ON
46 CHANGE REPLICATION SOURCE TO IGNORE_SERVER_IDS=() FOR CHANNEL '';
47
48 # clean up
49 RESET SLAVE ALL FOR CHANNEL 'ch1';
50
51 --source include/start_slave.inc
52
53 --source include/rpl_connection_master.inc
54 --source include/rpl_reset.inc
55
56 # End of WL#10963
57
58 #############################################################
59 # WL#13178 Deprecate WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS #
60 #############################################################
61
62 --source include/rpl_connection_master.inc
63 --source include/rpl_reset.inc
64 --source include/rpl_connection_master.inc
65 CREATE TABLE t1 (c1 INT);
66 DROP TABLE t1;
67 --let $gtids = `SELECT @@global.gtid_executed`
68
69 --source include/rpl_connection_slave.inc
70
71 # multiply the result of WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS as its
72 # return value is non-deterministic, otherwise, this could trigger
73 # random test failures
74
75 --replace_result $gtids GTIDS
76 --eval SELECT WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS("$gtids") * 0
77
78 --replace_result $gtids GTIDS
79 --eval SELECT WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS("$gtids", 10) * 0
80
81 --replace_result $gtids GTIDS
82 --eval SELECT WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS("$gtids", 10, "") * 0
83
84 --source include/rpl_connection_master.inc
85 --source include/rpl_reset.inc
86
87 # End of WL#13178
88
89 --source include/rpl_end.inc