| 1 |
################################################################################ |
| 2 |
# Validate that Group Replication is do handle correctly SQL API connection open |
| 3 |
# failure. |
| 4 |
# |
| 5 |
# Test: |
| 6 |
# 0. The test requires one servers: M1. |
| 7 |
# 1. Simulate that server did reach max_connections before |
| 8 |
# group replication is started, start will fail. |
| 9 |
# 2. Shutdown server. |
| 10 |
# 3. Clean up. |
| 11 |
################################################################################ |
| 12 |
--source include/have_debug.inc |
| 13 |
--source include/have_group_replication_plugin.inc |
| 14 |
--let $rpl_skip_group_replication_start= 1 |
| 15 |
--source include/group_replication.inc |
| 16 |
|
| 17 |
--echo |
| 18 |
--echo ############################################################ |
| 19 |
--echo # 1. Simulate that server did reach max_connections before |
| 20 |
--echo # group replication is started, start will fail. |
| 21 |
--let $rpl_connection_name= server1 |
| 22 |
--source include/rpl_connection.inc |
| 23 |
|
| 24 |
SET SESSION sql_log_bin= 0; |
| 25 |
call mtr.add_suppression("Failed to establish an internal server connection to execute plugin operations.*"); |
| 26 |
SET SESSION sql_log_bin= 1; |
| 27 |
|
| 28 |
--replace_result $group_replication_group_name GROUP_REPLICATION_GROUP_NAME |
| 29 |
--eval SET GLOBAL group_replication_group_name= "$group_replication_group_name" |
| 30 |
|
| 31 |
SET @debug_saved= @@GLOBAL.DEBUG; |
| 32 |
SET @@GLOBAL.DEBUG= '+d,simulate_reach_max_connections'; |
| 33 |
|
| 34 |
--error ER_GROUP_REPLICATION_CONFIGURATION |
| 35 |
START GROUP_REPLICATION; |
| 36 |
|
| 37 |
--let $assert_file= $MYSQLTEST_VARDIR/log/mysqld.1.err |
| 38 |
--let $assert_count = 1 |
| 39 |
--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. |
| 40 |
--let $assert_text = Found the expected error log message about exceeded max connections. |
| 41 |
--source include/assert_grep.inc |
| 42 |
|
| 43 |
|
| 44 |
--echo |
| 45 |
--echo ############################################################ |
| 46 |
--echo # 2. Shutdown server. |
| 47 |
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect |
| 48 |
--exec $MYSQL -e "shutdown;" 2>&1 |
| 49 |
--source include/wait_until_disconnected.inc |
| 50 |
|
| 51 |
--exec echo "restart:" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect |
| 52 |
--enable_reconnect |
| 53 |
--source include/wait_until_connected_again.inc |
| 54 |
|
| 55 |
--let $rpl_server_number= 1 |
| 56 |
--source include/rpl_reconnect.inc |
| 57 |
|
| 58 |
|
| 59 |
--echo |
| 60 |
--echo ############################################################ |
| 61 |
--echo # 3. Clean up. |
| 62 |
--let $rpl_connection_name= server1 |
| 63 |
--source include/rpl_connection.inc |
| 64 |
SET @@GLOBAL.DEBUG= @debug_save; |
| 65 |
|
| 66 |
--source include/group_replication_end.inc |