Commit 8d6ae0f2 authored by Anel Husakovic's avatar Anel Husakovic Committed by Anel

MDEV-32004: Remove extra `server_<num>_1` connections during initialization

- Remove extra connections in the form of `server_number_1` for the same server
  during initialization of servers in the `rpl_init.inc` file.
- Remove disconnecting and reconnecting to the same connections,
  since they are not used by the test.
- Update comments about the above.

- Reviewer: <knielsen@knielsen-hq.org>
            <brandon.nesterenko@mariadb.com>
parent 2534e5bc
......@@ -103,11 +103,9 @@ while ($_rpl_server)
--connection default
--let $_rpl_server= $rpl_server_count
--let $_rpl_one= _1
while ($_rpl_server)
{
--disconnect server_$_rpl_server
--disconnect server_$_rpl_server$_rpl_one
--dec $_rpl_server
}
......
......@@ -3,10 +3,7 @@
# Set up replication on several servers in a specified topology.
#
# By default, this script does the following:
# - Creates the connections server_1, server_2, ..., server_N, as
# well as extra connections server_1_1, server_2_1, ...,
# server_N_1. server_I and server_I_1 are connections to the same
# server.
# - Creates the connections server_1, server_2, ..., server_N.
# - Calls RESET MASTER, RESET SLAVE, USE test, CHANGE MASTER, START SLAVE.
# - Sets the connection to server_1 before exiting.
# With $rpl_check_server_ids parameter, the script does the following:
......@@ -143,18 +140,15 @@ if (!$rpl_debug)
}
# Create two connections to each server; reset master/slave, select
# Create connection to the server; reset master/slave, select
# database, set autoinc variables.
--let $_rpl_server= $rpl_server_count
--let $_rpl_one= _1
while ($_rpl_server)
{
# Connect.
--let $rpl_server_number= $_rpl_server
--let $rpl_connection_name= server_$_rpl_server
--source include/rpl_connect.inc
--let $rpl_connection_name= server_$_rpl_server$_rpl_one
--source include/rpl_connect.inc
# Configure server.
--let $rpl_connection_name= server_$_rpl_server
......
......@@ -72,11 +72,6 @@ if (!$_rpl_server_number)
--source include/rpl_connection.inc
--enable_reconnect
--let $_rpl_one= _1
--let $rpl_connection_name= server_$rpl_server_number$_rpl_one
--source include/rpl_connection.inc
--enable_reconnect
if ($rpl_debug)
{
--echo ---- Wait for reconnect and disable reconnect on all connections ----
......@@ -122,11 +117,5 @@ if (!$_rpl_server_number)
--source include/wait_until_connected_again.inc
--disable_reconnect
--let $rpl_connection_name= server_$rpl_server_number$_rpl_one
--source include/rpl_connection.inc
--source include/wait_until_connected_again.inc
--disable_reconnect
--let $include_filename= rpl_reconnect.inc
--source include/end_include_file.inc
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment