Debian Codegraph @

mysql-test/suite/rpl_gtid/r/rpl_async_conn_failover.result

raw
1 #
2 # 1. Create a chain replication between server 1, 2, 3 and 4.
3 #.
4 include/rpl_init.inc [topology=1->2->3->4]
5 Warnings:
6 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
7 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
8 Warnings:
9 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
10 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
11 Warnings:
12 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
13 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
14 #
15 # 2. Insert data on server1 and verify that its synced to the end of
16 # chain i.e. server4
17 #
18 [connection server_1]
19 CREATE TABLE t1 (a INT) ENGINE = InnoDB;
20 INSERT INTO t1 VALUES (1);
21 include/rpl_sync.inc
22 [connection server_4]
23 SET @old_debug= @@GLOBAL.DEBUG;
24 SET GLOBAL debug = '+d,async_conn_failover_disable_weight_check';
25 include/assert.inc ['There is one row on replica']
26 #
27 # 3. Verify Asynchronous Replication Connection Failover is initially
28 # disabled. Also verify Asynchronous Replication is initially
29 # connected to server 3.
30 #
31 include/assert.inc ['Asynchronous Replication Connection Failover is disabled']
32 #
33 # 4. Enable Asynchronous Replication Connection Failover and set retry
34 # count and retry time to 2 and verify its enabled in
35 # performance_schema.replication_connection_configuration.
36 #
37 include/stop_slave.inc
38 CHANGE REPLICATION SOURCE TO SOURCE_CONNECT_RETRY=1, SOURCE_RETRY_COUNT=2, SOURCE_CONNECTION_AUTO_FAILOVER=1;
39 include/start_slave.inc
40 include/assert.inc ['Asynchronous Replication Connection Failover is enabled']
41 #
42 # 5. Stop server 3.
43 #
44 include/rpl_stop_server.inc [server_number=3]
45 #
46 # 6. Verify that asynchronous replication fails with error
47 # ER_RPL_ASYNC_RECONNECT_FAIL_NO_SOURCE as there is no source
48 # added to table
49 # performance_schema.replication_asynchronous_connection_failover to
50 # connect.
51 #
52 [connection server_4]
53 include/wait_for_slave_io_error.inc [errno=2003]
54 #
55 # 7. Verify that asynchronous replication tries connecting to server 3
56 # two (retry_count=2) times before it fails.
57 #
58 include/assert_grep.inc [Assert that the IO thread tried two times connecting to server_3]
59 #
60 # 8. Add three asynchronous connection failover servers and
61 # verify that they are inserted successfully in
62 # performance_schema.replication_asynchronous_connection_failover.
63 #
64 SELECT asynchronous_connection_failover_add_source('', '127.0.0.1', SERVER_MYPORT_3, '', 60);;
65 asynchronous_connection_failover_add_source('', '127.0.0.1', SERVER_MYPORT_3, '', 60)
66 The UDF asynchronous_connection_failover_add_source() executed successfully.
67 SELECT asynchronous_connection_failover_add_source('', '127.0.0.1', SERVER_MYPORT_2, '', 50);;
68 asynchronous_connection_failover_add_source('', '127.0.0.1', SERVER_MYPORT_2, '', 50)
69 The UDF asynchronous_connection_failover_add_source() executed successfully.
70 SELECT asynchronous_connection_failover_add_source('', '127.0.0.1', SERVER_MYPORT_1, '', 40);;
71 asynchronous_connection_failover_add_source('', '127.0.0.1', SERVER_MYPORT_1, '', 40)
72 The UDF asynchronous_connection_failover_add_source() executed successfully.
73 include/assert.inc ['There are three rows in performance_schema.replication_asynchronous_connection_failover']
74 #
75 # 9. Restart replica IO so asynchronous replication connection failover
76 # can execute and connect to new sender/source.
77 #
78 include/start_slave_io.inc
79 #
80 # 10. Verify that asynchronous replication channel gets connected to
81 # server 2 and also verify that asynchronous replication tries
82 # connecting to server 3 two (retry_count=2) times.
83 #
84 include/assert_grep.inc [Assert that the IO thread tried two times connecting to server_3]
85 #
86 # 11. Insert more data on server1 and verify that its synced to the end
87 # of chain i.e. server 4.
88 #
89 [connection server_1]
90 INSERT INTO t1 VALUES (2);
91 [connection server_4]
92 #
93 # 12. Stop server 2.
94 #
95 include/rpl_stop_server.inc [server_number=2]
96 #
97 # 13. Verify that asynchronous replication channel gets connected to
98 # server 1 and also verify that asynchronous replication tries
99 # connecting to server 2 two (retry_count=2) times.
100 #
101 [connection server_4]
102 include/assert_grep.inc [Assert that the IO thread tried two times connecting to server_2]
103 #
104 # 14. Insert more data on server1 and verify that its synced to the
105 # server 4.
106 #
107 [connection server_1]
108 INSERT INTO t1 VALUES (3);
109 [connection server_4]
110 #
111 # 15. Stop server 1.
112 #
113 [connection server_4]
114 SET GLOBAL debug = '+d,replica_retry_count_exceed';
115 include/rpl_stop_server.inc [server_number=1]
116 #
117 # 16. Even after all source are stopped the replica IO thread keeps
118 # on re-trying to connect with all logged source in
119 # performance_schema.replication_asynchronous_connection_failover
120 # table. It tries connecting to server 3, 2, 1, and again 3, 2 1.
121 #
122 [connection server_4]
123 SET DEBUG_SYNC= 'now WAIT_FOR wait_for_retry_count_exceed';
124 SET DEBUG_SYNC= 'now SIGNAL continue_retry_count_exceed';
125 SET DEBUG_SYNC= 'now WAIT_FOR wait_for_retry_count_exceed';
126 SET DEBUG_SYNC= 'now SIGNAL continue_retry_count_exceed';
127 SET DEBUG_SYNC= 'now WAIT_FOR wait_for_retry_count_exceed';
128 SET DEBUG_SYNC= 'now SIGNAL continue_retry_count_exceed';
129 SET DEBUG_SYNC= 'now WAIT_FOR wait_for_retry_count_exceed';
130 SET DEBUG_SYNC= 'now SIGNAL continue_retry_count_exceed';
131 SET DEBUG_SYNC= 'now WAIT_FOR wait_for_retry_count_exceed';
132 SET DEBUG_SYNC= 'now SIGNAL continue_retry_count_exceed';
133 SET DEBUG_SYNC= 'now WAIT_FOR wait_for_retry_count_exceed';
134 SET @@GLOBAL.DEBUG= @old_debug;
135 SET DEBUG_SYNC= 'now SIGNAL continue_retry_count_exceed';
136 SET DEBUG_SYNC= 'RESET';
137 #
138 # 17. Stop replica IO
139 #
140 include/stop_slave.inc
141 #
142 # 18. Clean up
143 #
144 CHANGE REPLICATION SOURCE TO SOURCE_CONNECTION_AUTO_FAILOVER=0;
145 SELECT asynchronous_connection_failover_delete_source('', '127.0.0.1', SERVER_MYPORT_3, '');;
146 asynchronous_connection_failover_delete_source('', '127.0.0.1', SERVER_MYPORT_3, '')
147 The UDF asynchronous_connection_failover_delete_source() executed successfully.
148 SELECT asynchronous_connection_failover_delete_source('', '127.0.0.1', SERVER_MYPORT_2, '');;
149 asynchronous_connection_failover_delete_source('', '127.0.0.1', SERVER_MYPORT_2, '')
150 The UDF asynchronous_connection_failover_delete_source() executed successfully.
151 SELECT asynchronous_connection_failover_delete_source('', '127.0.0.1', SERVER_MYPORT_1, '');;
152 asynchronous_connection_failover_delete_source('', '127.0.0.1', SERVER_MYPORT_1, '')
153 The UDF asynchronous_connection_failover_delete_source() executed successfully.
154 include/rpl_start_server.inc [server_number=1]
155 [connection server_2]
156 include/rpl_start_server.inc [server_number=2]
157 include/start_slave.inc
158 [connection server_3]
159 include/rpl_start_server.inc [server_number=3]
160 include/start_slave.inc
161 [connection server_4]
162 include/start_slave.inc
163 [connection server_1]
164 DROP TABLE t1;
165 include/rpl_sync.inc
166 include/rpl_end.inc