Debian Codegraph @

mysql-test/suite/group_replication/r/gr_primary_mode_group_operations_36.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 set session sql_log_bin=0;
10 call mtr.add_suppression("The function 'group_replication_switch_to_multi_primary_mode' failed. Member has left the group. This operation was locally aborted and for that reason terminated.");
11 set session sql_log_bin=1;
12 CREATE TABLE test.t1 (a INT PRIMARY KEY);
13
14 # 2. Start server2 and server3
15 [connection server2]
16 include/start_group_replication.inc
17 [connection server3]
18 include/start_group_replication.inc
19
20 # 3. Begin a transaction on server1
21 [connection server1]
22 BEGIN;
23 INSERT INTO t1 VALUES(1);
24
25 # 4. Execute action to switch to multi primary
26 [connection server_1_1]
27 SELECT group_replication_switch_to_multi_primary_mode();
28
29 # 5. Assert that action is waiting for a member
30 [connection server2]
31 include/assert.inc [stage/group_rpl/Multi-primary Switch: waiting on another member step completion]
32
33 # 6. Restart a member, won't impact the success of action
34 [connection server_1]
35 include/stop_group_replication.inc
36
37 # 7. The action continued on other servers and everyone is on MP
38 [connection server2]
39 include/gr_assert_multi_primary_mode.inc
40 [connection server3]
41 include/gr_assert_multi_primary_mode.inc
42
43 # 8. Check that Single primary mode is true on server 1 and the update
44 # everywhere checks are false.
45 [connection server_1_1]
46 ERROR HY000: The function 'group_replication_switch_to_multi_primary_mode' failed. Member has left the group. This operation was locally aborted and for that reason terminated.
47 include/assert.inc [group_replication_enforce_update_everywhere_checks is OFF]
48
49 # 9. Cleanup
50 [connection server1]
51 ROLLBACK;
52 SET GLOBAL group_replication_single_primary_mode= OFF;
53 SET GLOBAL group_replication_enforce_update_everywhere_checks= ON;
54 include/start_group_replication.inc
55 [connection server2]
56 DROP TABLE t1;
57 include/group_replication_end.inc