Debian Codegraph @

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

raw
1 include/group_replication.inc [rpl_server_count=3]
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 # 1. Server1 start, bootstrap the group and create table test.t1
8 include/start_and_bootstrap_group_replication.inc
9 CREATE TABLE test.t1 (a INT PRIMARY KEY);
10
11 # 2. Start server2 and server3
12 [connection server2]
13 include/start_group_replication.inc
14 [connection server3]
15 include/start_group_replication.inc
16
17 # 3. Begin a transaction on server1
18 [connection server1]
19 BEGIN;
20 INSERT INTO t1 VALUES(1);
21
22 # 4. Execute action to switch to multi primary
23 [connection server_1_1]
24 SELECT group_replication_switch_to_multi_primary_mode();
25
26 # 5. Assert that action is waiting for a member
27 [connection server2]
28 include/assert.inc [stage/group_rpl/Multi-primary Switch: waiting on another member step completion]
29
30 # 6. Restart a member, won't impact the success of action
31 [connection server3]
32 # Kill and restart:--group_replication_local_address=GROUP_REPLICATION_LOCAL_ADDRESS --group_replication_group_seeds=GROUP_REPLICATION_GROUP_SEEDS --group_replication_group_name=GROUP_REPLICATION_GROUP_NAME
33 include/rpl_reconnect.inc
34
35 # 7. COMMIT pending transaction to action switch to multi primary be
36 # executed
37 [connection server1]
38 COMMIT;
39 [connection server_1_1]
40 group_replication_switch_to_multi_primary_mode()
41 Mode switched to multi-primary successfully.
42
43 # 8. Confirm that exists two members as primary in the group
44 include/gr_assert_multi_primary_mode.inc
45 [connection server_2]
46 include/gr_assert_multi_primary_mode.inc
47
48 # 9. Cleanup
49 DROP TABLE t1;
50 [connection server_3]
51 DROP TABLE t1;
52 [connection server_2]
53 include/group_replication_end.inc