File: rpl_gtid_deprecations.test

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (89 lines) | stat: -rw-r--r-- 2,903 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
--source include/not_rpl_gtid_only.inc
--source include/master-slave.inc

# Test has more than one channel, so cannot run with
# master-info-repository=FILE, relay-log-info-repository=FILE
--source include/have_slave_repository_type_table.inc

# no need to run multiple times
--source include/have_binlog_format_row.inc

#############################################################
# WL#10963 Deprecate IGNORE_SERVER_IDS when GTID_MODE=ON    #
#############################################################

--source include/rpl_connection_slave.inc
--source include/stop_slave.inc

# assert that a warning is emited when setting ignore_server_ids
# and GTID_MODE=ON
CHANGE REPLICATION SOURCE TO IGNORE_SERVER_IDS=(1,2,3);

# create a second channel
CHANGE REPLICATION SOURCE TO SOURCE_HOST='dummy', IGNORE_SERVER_IDS=(1) FOR CHANNEL 'ch1';

# assert that warning is not emitted when gtid_mode != ON
CHANGE REPLICATION SOURCE TO SOURCE_AUTO_POSITION=0 FOR CHANNEL '';
SET @@global.gtid_mode=ON_PERMISSIVE;
SET @@global.gtid_mode=OFF_PERMISSIVE;
SET @@global.gtid_mode=OFF;
SET @@global.gtid_mode=OFF_PERMISSIVE;
SET @@global.gtid_mode=ON_PERMISSIVE;
CHANGE REPLICATION SOURCE TO SOURCE_AUTO_POSITION=1 FOR CHANNEL '';

# assert that a warning is emited when setting gtid_mode=on and
# IGNORE_SERVER_IDS is also set (and that we only get one warning
# even though there are two channels configured to ignore server
# ids).
SET @@global.gtid_mode=ON;

# assert that even if changing to GTID_MODE=ON again (no-op) we
# get the warning anyway
SET @@global.gtid_mode=ON;

# assert that no warning is emited when unsetting ignore_server_ids
# and GTID_MODE=ON
CHANGE REPLICATION SOURCE TO IGNORE_SERVER_IDS=() FOR CHANNEL '';

# clean up
RESET SLAVE ALL FOR CHANNEL 'ch1';

--source include/start_slave.inc

--source include/rpl_connection_master.inc
--source include/rpl_reset.inc

# End of WL#10963

#############################################################
# WL#13178 Deprecate WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS      #
#############################################################

--source include/rpl_connection_master.inc
--source include/rpl_reset.inc
--source include/rpl_connection_master.inc
CREATE TABLE t1 (c1 INT);
DROP TABLE t1;
--let $gtids = `SELECT @@global.gtid_executed`

--source include/rpl_connection_slave.inc

# multiply the result of WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS as its
# return value is non-deterministic, otherwise, this could trigger
# random test failures

--replace_result $gtids GTIDS
--eval SELECT WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS("$gtids") * 0

--replace_result $gtids GTIDS
--eval SELECT WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS("$gtids", 10) * 0

--replace_result $gtids GTIDS
--eval SELECT WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS("$gtids", 10, "") * 0

--source include/rpl_connection_master.inc
--source include/rpl_reset.inc

# End of WL#13178

--source include/rpl_end.inc