3
# Test that the sync chain generated by
4
# include/rpl_change_topology.inc (sourced from include/rpl_init.inc)
7
# We test a number of different topologies. Each topology is tested
8
# in extra/rpl_tests/rpl_test_framework.inc. See
9
# extra/rpl_tests/rpl_test_framework.inc for details on how the sync
12
# ==== Related bugs ====
14
# BUG#49978: Replication tests don't clean up replication state at the end
17
# We only need to execute this test once. Also, we rely on 'DELETE
18
# FROM t1' to remove rows in slave tables that don't exist in master
19
# tables (see include/rpl_test_framework.inc for details).
20
--source include/have_binlog_format_statement.inc
23
--echo ==== Create t1 on all servers. ====
24
if ($mtr_supports_more_than_10_servers)
26
--let $rpl_server_count= 15
27
--let $rpl_topology= 1->2->3->4->5->6->7->8->9->10->11->12->13->14->15
29
if (!$mtr_supports_more_than_10_servers)
31
--let $rpl_server_count= 9
32
--let $rpl_topology= 1->2->3->4->5->6->7->8->9
34
--source include/rpl_init.inc
35
CREATE TABLE t1 (a INT);
36
--source include/rpl_end.inc
38
# Initialize $next_number before first call to
39
# extra/rpl_tests/rpl_test_framework.text
43
--echo ==== Test 3-server topologies ====
45
--let $rpl_server_count= 3
47
--let $rpl_topology= 1 -> 2
49
--source extra/rpl_tests/rpl_test_framework.inc
51
--let $rpl_topology= 2 -> 3
53
--source extra/rpl_tests/rpl_test_framework.inc
55
--let $rpl_topology= none
57
--source extra/rpl_tests/rpl_test_framework.inc
59
--let $rpl_topology= 1->2, 2->1
61
--source extra/rpl_tests/rpl_test_framework.inc
63
--let $rpl_topology= 1->2->1
65
--source extra/rpl_tests/rpl_test_framework.inc
67
--let $rpl_topology= 2->1->2
69
--source extra/rpl_tests/rpl_test_framework.inc
71
--let $rpl_topology= 1->2->3
73
--source extra/rpl_tests/rpl_test_framework.inc
75
--let $rpl_topology= 2->3->2->1
77
--source extra/rpl_tests/rpl_test_framework.inc
79
--let $rpl_topology= 1->2,2->3,3->1
81
--source extra/rpl_tests/rpl_test_framework.inc
83
--let $rpl_topology= 1->3->2->1
85
--source extra/rpl_tests/rpl_test_framework.inc
88
--echo ==== Test 6-server topologies ====
90
--let $rpl_server_count= 6
92
--let $rpl_topology= 1->2->3->4->1->5->6
94
--source extra/rpl_tests/rpl_test_framework.inc
96
--let $rpl_topology= 3->4->5->6->3->1->2
98
--source extra/rpl_tests/rpl_test_framework.inc
100
--let $rpl_topology= 6->5->4->3->2->1
102
--source extra/rpl_tests/rpl_test_framework.inc
104
--let $rpl_topology= 1->2->3->1,4->5->6
106
--source extra/rpl_tests/rpl_test_framework.inc
109
--echo ==== Test 9-server topology ====
111
--let $rpl_server_count= 9
113
--let $rpl_topology= 1->2, 2->3, 3->4, 4->5, 5->1, 1->6, 6->7, 6->8, 8->9
115
--source extra/rpl_tests/rpl_test_framework.inc
117
if ($mtr_supports_more_than_10_servers) {
118
--echo ==== Test 15-server topologies ====
120
--let $rpl_server_count= 15
122
--let $rpl_topology= 1->2->3->4->5->6->7->8->9->10->11->12->13->14->15->1
124
--source extra/rpl_tests/rpl_test_framework.inc
126
# This is a binary tree
127
--let $rpl_topology= 1->2->4->8,1->3->6->12,2->5->10,3->7->14,4->9,5->11,6->13,7->15
129
--source extra/rpl_tests/rpl_test_framework.inc
132
--echo ==== Clean up ====
134
if ($mtr_supports_more_than_10_servers) {
135
--let $rpl_topology= 1->2->3->4->5->6->7->8->9->10->11->12->13->14->15
137
if (!$mtr_supports_more_than_10_servers) {
138
--let $rpl_topology= 1->2->3->4->5->6->7->8->9
140
--source include/rpl_init.inc
141
--connection server_1
143
--source include/rpl_end.inc