Debian Codegraph @

mysql-test/suite/group_replication/t/gr_sql_service_failure.test

raw
1 ################################################################################
2 # Validate that Group Replication behaves properly when SQL service does fail.
3 #
4 # Test:
5 # 0. The test requires one servers: M1.
6 # 1. Start GR. Force SQL Service to return error failing Start GR.
7 # 2. Start GR successfully now.
8 # 3. Clean up.
9 ################################################################################
10 --source include/have_debug.inc
11 --source include/have_group_replication_plugin.inc
12 --let $rpl_skip_group_replication_start= 1
13 --source include/group_replication.inc
14
15 SET SESSION sql_log_bin= 0;
16 call mtr.add_suppression("Failed to establish an internal server connection to execute plugin operations");
17 SET SESSION sql_log_bin= 1;
18
19 --echo
20 --echo # 1. Start GR. Force SQL Service to return error failing Start GR.
21 --echo
22
23 SET @debug_save= @@GLOBAL.DEBUG;
24 SET @@GLOBAL.DEBUG= '+d,group_replication_sql_service_force_error';
25
26 --disable_query_log
27 SET GLOBAL group_replication_bootstrap_group=ON;
28 --eval SET GLOBAL group_replication_group_name= "$group_replication_group_name"
29 --enable_query_log
30
31 --error ER_GROUP_REPLICATION_CONFIGURATION
32 START GROUP_REPLICATION;
33 --source include/gr_clear_bootstrap_group.inc
34
35 --echo
36 --echo # 2. Start GR successfully now.
37 --echo
38
39 SET @@GLOBAL.DEBUG= '-d,group_replication_sql_service_force_error';
40 --source include/start_and_bootstrap_group_replication.inc
41
42 --let $rpl_connection_name= server2
43 --source include/rpl_connection.inc
44
45 --source include/start_group_replication.inc
46
47 --echo
48 --echo # 3. Clean up.
49 --echo
50
51 --let $rpl_connection_name= server1
52 --source include/rpl_connection.inc
53
54 SET @@GLOBAL.DEBUG= @debug_save;
55 --source include/group_replication_end.inc