Debian Codegraph @

mysql-test/suite/group_replication/r/gr_primary_mode_group_operations_35.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 set session sql_log_bin=0;
7 call mtr.add_suppression("The server was automatically set into read only mode after an error was detected.");
8 call mtr.add_suppression("A configuration change was killed in this member. The member will now leave the group as its configuration may have diverged.");
9 call mtr.add_suppression("Skipping leave operation: concurrent attempt to leave the group is on-going.");
10 call mtr.add_suppression("The function 'group_replication_switch_to_single_primary_mode' failed. This operation was locally killed and for that reason terminated*");
11 set session sql_log_bin=1;
12 [connection server2]
13 CREATE TABLE test.t1 (a INT PRIMARY KEY);
14 include/rpl_sync.inc
15
16 # 1. Get a transaction stuck on server 2 (the new primary)
17 [connection server_2]
18 # Adding debug point 'group_replication_wait_on_observer_trans' to @@GLOBAL.debug
19 [connection server_1]
20 INSERT INTO t1 VALUES (1);
21 [connection server_2]
22 SET DEBUG_SYNC= "now WAIT_FOR signal.group_replication_wait_on_observer_trans_waiting";
23
24 # 2. Do a change to single primary mode with server 2 as the new primary
25 # Get the connection ID
26 # See that it is stuck on Primary election
27 [connection server1]
28 SELECT group_replication_switch_to_single_primary_mode("MEMBER2_UUID");
29 [connection server_1]
30 include/assert.inc [The stage should be "Single-primary Switch: executing Primary election"]
31 [connection server3]
32 include/assert.inc [The stage should be "Single-primary Switch: executing Primary election"]
33
34 # 3. Kill the query
35 [connection server_1]
36 KILL QUERY CONNECTION_ID;
37
38 # 4. Resume transactions, it shall succeed and check the action
39 # completed in the other members
40 [connection server_2]
41 # Removing debug point 'group_replication_wait_on_observer_trans' from @@GLOBAL.debug
42 SET DEBUG_SYNC= 'now SIGNAL signal.group_replication_wait_on_observer_trans_continue';
43 [connection server1]
44 group_replication_switch_to_single_primary_mode("MEMBER2_UUID")
45 Mode switched to single-primary successfully.
46 [connection server_2]
47 include/gr_assert_primary_member.inc
48 SET DEBUG_SYNC='RESET';
49 [connection server3]
50 include/gr_assert_secondary_member.inc
51 [connection server1]
52 include/gr_assert_secondary_member.inc
53
54 # 5. Cleanup
55 [connection server2]
56 DROP TABLE t1;
57 include/group_replication_end.inc