← Back
Editing: gr_reach_max_connections_during_start.test
################################################################################ # 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 ../inc/have_group_replication_plugin.inc --let $rpl_skip_group_replication_start= 1 --source ../inc/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("Can't establish a 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; --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_only_after = CURRENT_TEST: group_replication.gr_reach_max_connections_during_start --let $assert_count = 1 --let $assert_select = Can't establish a 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 ../inc/group_replication_end.inc
Save File
Cancel