File: gr_primary_mode_group_operations_16.result

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (58 lines) | stat: -rw-r--r-- 3,443 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
include/group_replication.inc [rpl_server_count=3]
Warnings:
Note	####	Sending passwords in plain text without SSL/TLS is extremely insecure.
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.
[connection server1]

# 1. server1 start group replication and server2 join
set session sql_log_bin=0;
call mtr.add_suppression("Can't start IO THREAD for channel 'ch3_1' when group replication is running a group configuration operation 'Change to single primary mode'*");
call mtr.add_suppression("Run function 'thread_start' in plugin 'group_replication' failed");
call mtr.add_suppression("Replica I/O for channel 'ch3_1': Fatal error: Failed to run 'thread_start' hook, Error_code:*");
call mtr.add_suppression("Can't start SQL THREAD for channel 'ch3_1' when group replication is running a group configuration operation 'Change to single primary mode'*");
call mtr.add_suppression("Run function 'applier_start' in plugin 'group_replication' failed");
call mtr.add_suppression("Replica SQL for channel 'ch3_1': Fatal error: Failed to run 'applier_start' hook, Error_code:*");
set session sql_log_bin=1;
include/start_and_bootstrap_group_replication.inc
[connection server2]
include/start_group_replication.inc

# 2. Activate debug point that will block the group action when changing
#    to single primary mode
SET @@GLOBAL.DEBUG= '+d,group_replication_block_group_action';

# 3. Execute action to change group to single primary mode
SELECT group_replication_switch_to_single_primary_mode("MEMBER1_UUID");

# 4. Start a slave connection on server1 to server3. Should fail, action
#    is ongoing
[connection server1]
CHANGE REPLICATION SOURCE TO SOURCE_HOST='localhost', SOURCE_USER='root', SOURCE_PORT=SERVER_3_PORT for channel 'ch3_1';
Warnings:
Note	1759	Sending passwords in plain text without SSL/TLS is extremely insecure.
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.
START SLAVE FOR CHANNEL 'ch3_1';
Warnings:
Warning	1287	'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
include/wait_for_slave_io_error.inc [errno=13117 FOR CHANNEL 'ch3_1']
include/wait_for_slave_sql_error.inc [errno=13117 FOR CHANNEL 'ch3_1']

# 5. Verify occurrence of error message
include/assert_grep.inc [Found the expected error about failure to start slave IO THREAD.]
include/assert_grep.inc [Found the expected error about failure to start slave SQL THREAD.]

# 6. Unlock the action
[connection server_2]
SET DEBUG_SYNC= "now SIGNAL signal.action_continue";
[connection server2]
group_replication_switch_to_single_primary_mode("MEMBER1_UUID")
Mode switched to single-primary successfully.

# 7. Clean up
[connection server1]
RESET SLAVE ALL FOR CHANNEL 'ch3_1';
Warnings:
Warning	1287	'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
[connection server2]
SET @@GLOBAL.DEBUG= '-d,group_replication_block_group_action';
include/group_replication_end.inc