Debian Codegraph @

mysql-test/suite/group_replication/r/gr_stop_async_on_stop_gr.result

raw
1 include/group_replication.inc
2 Warnings:
3 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4 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.
5 [connection server1]
6
7 ############################################################
8 # 1. Setup Group Replication on server 1.
9 [connection server1]
10 include/start_and_bootstrap_group_replication.inc
11
12 ############################################################
13 # 2. Setup a asynchronous replication connection from server 2
14 # into group (server 1)
15 [connection server1]
16 CHANGE REPLICATION SOURCE TO SOURCE_HOST='localhost', SOURCE_USER='root', SOURCE_PORT=SERVER_2_PORT, SOURCE_AUTO_POSITION=1 for channel 'ch2_1';
17 Warnings:
18 Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure.
19 Note 1760 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.
20 include/start_slave.inc
21
22 ############################################################
23 # 3. Execute some transactions on server 2.
24 [connection server2]
25 CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
26 INSERT INTO t1 VALUES (0);
27
28 ############################################################
29 # 4. Wait until transactions executed on server 2 are applied
30 # on group.
31 include/sync_slave_sql_with_master.inc [FOR CHANNEL ch2_1]
32
33 ############################################################
34 # 5. Activate group_replication_stop_all_channels_failure
35 # debug sync point, which will return
36 # ER_GROUP_REPLICATION_COMMAND_FAILURE error, when stop
37 # group replication calls to stop all replication channels.
38 [connection server1]
39 # 5.1. Stop Group Replication
40 SET @debug_save= @@GLOBAL.DEBUG;
41 SET @@GLOBAL.DEBUG='d,group_replication_stop_all_channels_failure';
42 STOP GROUP_REPLICATION;
43 ERROR HY000: The STOP GROUP_REPLICATION command encountered a failure. Error stopping all replication channels while server was leaving the group. Error stopping channel(s): '' [error number: 1], 'ch2_1' [error number: 1]. Please check the error log for additional details.
44 SET @@GLOBAL.DEBUG= @debug_save;
45 # 5.2. Verify member is OFFLINE
46 include/gr_wait_for_member_state.inc
47 # 5.3. Verify occurrence of error message
48 Occurrences of 'Error stopping channel: ch2_1. Got error: 1, Error_code: MY-000001' in the input file: 1
49 Occurrences of 'Error stopping channel: . Got error: 1, Error_code: MY-000001' in the input file: 1
50
51 ############################################################
52 # 6. Execute data on server 2 and ensure it is not accepted on server 1.
53 [connection server2]
54 INSERT INTO t1 VALUES (1);
55
56 ############################################################
57 # 7. Verify channel ch2_1 IO and SQL THREADS are OFF
58 [connection server1]
59 include/wait_for_slave_to_stop.inc [FOR CHANNEL 'ch2_1']
60 include/assert.inc [Verify channel ch2_1 IO_THREAD is OFF]
61 include/assert.inc [Verify channel ch2_1 SQL_THREAD is OFF]
62
63 ############################################################
64 # 8. Verify data isn't replicated to group i.e. server1
65 include/assert.inc ['There is no value 1 in table t1']
66
67 ############################################################
68 # 9. Clean Up
69 [connection server1]
70 SET GLOBAL read_only= 0;
71 RESET SLAVE ALL FOR CHANNEL 'ch2_1';
72 Warnings:
73 Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
74 DROP TABLE test.t1;
75 [connection server2]
76 DROP TABLE test.t1;
77 include/group_replication_end.inc