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

57 lines
1.8 KiB
Plaintext

################################################################################
# Validate that Group Replication behaves properly when SQL service does fail.
#
# Test:
# 0. The test requires one servers: M1.
# 1. Start GR. Force SQL Service to return error failing Start GR.
# 2. Start GR successfully now.
# 3. Clean up.
################################################################################
--source include/have_debug.inc
--source include/have_group_replication_plugin.inc
--let $rpl_skip_group_replication_start= 1
--source include/group_replication.inc
SET SESSION sql_log_bin= 0;
call mtr.add_suppression("Failed to establish an internal server connection to execute plugin operations");
call mtr.add_suppression("Error calling group communication interfaces while trying to leave the group");
SET SESSION sql_log_bin= 1;
--echo
--echo # 1. Start GR. Force SQL Service to return error failing Start GR.
--echo
SET @debug_save= @@GLOBAL.DEBUG;
SET @@GLOBAL.DEBUG= '+d,group_replication_sql_service_force_error';
--disable_query_log
SET GLOBAL group_replication_bootstrap_group=ON;
--eval SET GLOBAL group_replication_group_name= "$group_replication_group_name"
--enable_query_log
--error ER_GROUP_REPLICATION_CONFIGURATION
START GROUP_REPLICATION;
--source include/gr_clear_bootstrap_group.inc
--echo
--echo # 2. Start GR successfully now.
--echo
SET @@GLOBAL.DEBUG= '-d,group_replication_sql_service_force_error';
--source include/start_and_bootstrap_group_replication.inc
--let $rpl_connection_name= server2
--source include/rpl_connection.inc
--source include/start_group_replication.inc
--echo
--echo # 3. Clean up.
--echo
--let $rpl_connection_name= server1
--source include/rpl_connection.inc
SET @@GLOBAL.DEBUG= @debug_save;
--source include/group_replication_end.inc