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 59 60 61 62 63 64 65 66
|
################################################################################
# Validate that Group Replication is do handle correctly SQL API connection open
# failure.
#
# Test:
# 0. The test requires one servers: M1.
# 1. Simulate that server did reach max_connections before
# group replication is started, start will fail.
# 2. Shutdown server.
# 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
--echo
--echo ############################################################
--echo # 1. Simulate that server did reach max_connections before
--echo # group replication is started, start will fail.
--let $rpl_connection_name= server1
--source include/rpl_connection.inc
SET SESSION sql_log_bin= 0;
call mtr.add_suppression("Failed to establish an internal server connection to execute plugin operations.*");
SET SESSION sql_log_bin= 1;
--replace_result $group_replication_group_name GROUP_REPLICATION_GROUP_NAME
--eval SET GLOBAL group_replication_group_name= "$group_replication_group_name"
SET @debug_saved= @@GLOBAL.DEBUG;
SET @@GLOBAL.DEBUG= '+d,simulate_reach_max_connections';
--error ER_GROUP_REPLICATION_CONFIGURATION
START GROUP_REPLICATION;
--let $assert_file= $MYSQLTEST_VARDIR/log/mysqld.1.err
--let $assert_count = 1
--let $assert_select = Failed to establish an internal server connection to execute plugin operations since the server does not have available connections, please increase @@GLOBAL.MAX_CONNECTIONS.
--let $assert_text = Found the expected error log message about exceeded max connections.
--source include/assert_grep.inc
--echo
--echo ############################################################
--echo # 2. Shutdown server.
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--exec $MYSQL -e "shutdown;" 2>&1
--source include/wait_until_disconnected.inc
--exec echo "restart:" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
--source include/wait_until_connected_again.inc
--let $rpl_server_number= 1
--source include/rpl_reconnect.inc
--echo
--echo ############################################################
--echo # 3. Clean up.
--let $rpl_connection_name= server1
--source include/rpl_connection.inc
SET @@GLOBAL.DEBUG= @debug_save;
--source include/group_replication_end.inc
|