mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-32004: Cosmetic fixes
- Reviewer: <knielsen@knielsen-hq.org> <brandon.nesterenko@mariadb.com>
This commit is contained in:
@ -5,15 +5,15 @@
|
|||||||
# need to change topology after they have sourced include/rpl_init.inc
|
# need to change topology after they have sourced include/rpl_init.inc
|
||||||
#
|
#
|
||||||
# This file sets up variables needed by include/rpl_sync.inc and many
|
# This file sets up variables needed by include/rpl_sync.inc and many
|
||||||
# other replication scripts in the include/ directory. It also issues
|
# other replication scripts in the include/ directory. It also issues
|
||||||
# CHANGE MASTER on all servers where the configuration changes from
|
# CHANGE MASTER on all servers where the configuration changes from
|
||||||
# what it was before. It does not issue START SLAVE (use
|
# what it was before. It does not issue START SLAVE (use
|
||||||
# include/rpl_start_slaves.inc for that).
|
# include/rpl_start_slaves.inc for that).
|
||||||
#
|
#
|
||||||
# Note: it is not currently possible to change the number of servers
|
# Note: it is not currently possible to change the number of servers
|
||||||
# after the rpl_init.inc, without first calling rpl_end.inc. So the
|
# after the rpl_init.inc, without first calling rpl_end.inc. So the
|
||||||
# test has to set $rpl_server_count to the total number of servers
|
# test has to set $rpl_server_count to the total number of servers
|
||||||
# that the test uses, before it sources include/rpl_init.inc. After
|
# that the test uses, before it sources include/rpl_init.inc. After
|
||||||
# that, $rpl_server_count must not change until after next time the
|
# that, $rpl_server_count must not change until after next time the
|
||||||
# test sources include/rpl_end.inc.
|
# test sources include/rpl_end.inc.
|
||||||
#
|
#
|
||||||
@ -37,7 +37,7 @@
|
|||||||
# By default, CHANGE MASTER is executed with MASTER_LOG_FILE set
|
# By default, CHANGE MASTER is executed with MASTER_LOG_FILE set
|
||||||
# to the name of the last binlog file on the master (retrieved by
|
# to the name of the last binlog file on the master (retrieved by
|
||||||
# executing SHOW MASTER STATUS). This variable can be set to
|
# executing SHOW MASTER STATUS). This variable can be set to
|
||||||
# specify another filename. This variable should be a
|
# specify another filename. This variable should be a
|
||||||
# comma-separated list of the following form:
|
# comma-separated list of the following form:
|
||||||
#
|
#
|
||||||
# SERVER_NUMBER_1:FILE_NAME_1,SERVER_NUMBER_2:FILE_NAME_2,...
|
# SERVER_NUMBER_1:FILE_NAME_1,SERVER_NUMBER_2:FILE_NAME_2,...
|
||||||
@ -45,7 +45,7 @@
|
|||||||
# Before CHANGE MASTER is executed on server N, this script checks
|
# Before CHANGE MASTER is executed on server N, this script checks
|
||||||
# if $rpl_master_log_file contains the text N:FILE_NAME. If it
|
# if $rpl_master_log_file contains the text N:FILE_NAME. If it
|
||||||
# does, then MASTER_LOG_FILE is set to FILE_NAME. Otherwise,
|
# does, then MASTER_LOG_FILE is set to FILE_NAME. Otherwise,
|
||||||
# MASTER_LOG_FILE is set to the last binlog on the master. For
|
# MASTER_LOG_FILE is set to the last binlog on the master. For
|
||||||
# example, to specify that server_1 should start replicate from
|
# example, to specify that server_1 should start replicate from
|
||||||
# master-bin.000007 and server_5 should start replicate from
|
# master-bin.000007 and server_5 should start replicate from
|
||||||
# master-bin.012345, do:
|
# master-bin.012345, do:
|
||||||
@ -53,9 +53,9 @@
|
|||||||
#
|
#
|
||||||
# $rpl_master_log_pos
|
# $rpl_master_log_pos
|
||||||
# By default, CHANGE MASTER is executed without specifying the
|
# By default, CHANGE MASTER is executed without specifying the
|
||||||
# MASTER_LOG_POS parameter. This variable can be set to set a
|
# MASTER_LOG_POS parameter. This variable can be set to set a
|
||||||
# specific position. It has the same form as $rpl_master_log_file
|
# specific position. It has the same form as $rpl_master_log_file
|
||||||
# (see above). For example, to specify that server_3 should start
|
# (see above). For example, to specify that server_3 should start
|
||||||
# replicate from position 4711 of its master, do:
|
# replicate from position 4711 of its master, do:
|
||||||
# --let $rpl_master_log_pos= 3:4711
|
# --let $rpl_master_log_pos= 3:4711
|
||||||
#
|
#
|
||||||
@ -72,7 +72,7 @@
|
|||||||
# include/rpl_stop_slaves.inc
|
# include/rpl_stop_slaves.inc
|
||||||
# include/rpl_end.inc
|
# include/rpl_end.inc
|
||||||
#
|
#
|
||||||
# $rpl_server_count_length:
|
# $rpl_server_count_length
|
||||||
# Set to LENGTH($rpl_server_count). So if $rpl_server_count < 10,
|
# Set to LENGTH($rpl_server_count). So if $rpl_server_count < 10,
|
||||||
# then $rpl_server_count_length = 1; if 10 <= $rpl_server_count <
|
# then $rpl_server_count_length = 1; if 10 <= $rpl_server_count <
|
||||||
# 100, then $rpl_server_count_length = 2, etc.
|
# 100, then $rpl_server_count_length = 2, etc.
|
||||||
@ -83,12 +83,12 @@
|
|||||||
# server N is a slave, then the N'th number is the master of server
|
# server N is a slave, then the N'th number is the master of server
|
||||||
# N. If server N is not a slave, then the N'th number is just spaces
|
# N. If server N is not a slave, then the N'th number is just spaces
|
||||||
# (so in fact it is not a number). For example, if $rpl_topology is
|
# (so in fact it is not a number). For example, if $rpl_topology is
|
||||||
# '1->2,2->3,3->1,2->4,5->6', then $rpl_master_list is '3122 6'.
|
# '1->2,2->3,3->1,2->4,5->6', then $rpl_master_list is '3122 5'.
|
||||||
#
|
#
|
||||||
# $rpl_sync_chain_dirty
|
# $rpl_sync_chain_dirty
|
||||||
# This variable is set to 1. This tells include/rpl_sync.inc to
|
# This variable is set to 1. This tells include/rpl_sync.inc to
|
||||||
# compute a new value for $rpl_sync_chain next time that
|
# compute a new value for $rpl_sync_chain next time that
|
||||||
# include/rpl_sync.inc is sourced. See
|
# include/rpl_sync.inc is sourced. See
|
||||||
# include/rpl_generate_sync_chain.inc and include/rpl_sync.inc for
|
# include/rpl_generate_sync_chain.inc and include/rpl_sync.inc for
|
||||||
# details.
|
# details.
|
||||||
|
|
||||||
@ -124,7 +124,7 @@ if ($rpl_master_list == '')
|
|||||||
if ($rpl_debug)
|
if ($rpl_debug)
|
||||||
{
|
{
|
||||||
--echo \$rpl_server_count='$rpl_server_count'
|
--echo \$rpl_server_count='$rpl_server_count'
|
||||||
--echo \$rpl_server_count_length='$rpl_server_count_length'
|
--echo old \$rpl_server_count_length='$rpl_server_count_length'
|
||||||
--echo new \$rpl_topology='$_rpl_topology'
|
--echo new \$rpl_topology='$_rpl_topology'
|
||||||
--echo old \$rpl_master_list='$rpl_master_list'
|
--echo old \$rpl_master_list='$rpl_master_list'
|
||||||
--echo old \$rpl_sync_chain='$rpl_sync_chain'
|
--echo old \$rpl_sync_chain='$rpl_sync_chain'
|
||||||
@ -210,6 +210,10 @@ if (!$rpl_skip_change_master)
|
|||||||
--let $rpl_connection_name= server_$_rpl_master
|
--let $rpl_connection_name= server_$_rpl_master
|
||||||
--source include/rpl_connection.inc
|
--source include/rpl_connection.inc
|
||||||
--let $_rpl_master_log_file= query_get_value(SHOW MASTER STATUS, File, 1)
|
--let $_rpl_master_log_file= query_get_value(SHOW MASTER STATUS, File, 1)
|
||||||
|
if ($rpl_debug)
|
||||||
|
{
|
||||||
|
--echo "\$rpl_master_log_file parameter not set for the master: $_rpl_master, use the latest binlog file by executing SHOW MASTER STATUS."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
# Change connection.
|
# Change connection.
|
||||||
--let $rpl_connection_name= server_$_rpl_server
|
--let $rpl_connection_name= server_$_rpl_server
|
||||||
@ -224,6 +228,10 @@ if (!$rpl_skip_change_master)
|
|||||||
if (!$_rpl_master_log_pos_index)
|
if (!$_rpl_master_log_pos_index)
|
||||||
{
|
{
|
||||||
--let $_rpl_master_log_pos=
|
--let $_rpl_master_log_pos=
|
||||||
|
if ($rpl_debug)
|
||||||
|
{
|
||||||
|
--echo "\$rpl_master_log_pos parameter not set for the master: $_rpl_master. Set log position to empty."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
eval CHANGE MASTER TO MASTER_HOST = '127.0.0.1', MASTER_PORT = $_rpl_port, MASTER_USER = 'root', MASTER_LOG_FILE = '$_rpl_master_log_file'$_rpl_master_log_pos, MASTER_CONNECT_RETRY = 1;
|
eval CHANGE MASTER TO MASTER_HOST = '127.0.0.1', MASTER_PORT = $_rpl_port, MASTER_USER = 'root', MASTER_LOG_FILE = '$_rpl_master_log_file'$_rpl_master_log_pos, MASTER_CONNECT_RETRY = 1;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
# This script is normally used internally by rpl_init.inc and
|
# This script is normally used internally by rpl_init.inc and
|
||||||
# master-slave.inc, but it can also be used in test cases that need to
|
# master-slave.inc, but it can also be used in test cases that need to
|
||||||
# create more connections or re-create connections after disconnect.
|
# create more connections or re-create connections after disconnect.
|
||||||
#
|
# Default ports SERVER_MYPORT_[1,2] are set by rpl_init.inc.
|
||||||
#
|
#
|
||||||
# ==== Usage ====
|
# ==== Usage ====
|
||||||
#
|
#
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# ==== Purpose ====
|
# ==== Purpose ====
|
||||||
#
|
#
|
||||||
# Execute a .inc file once for each server that was configured as a
|
# Execute a .inc file once for each server that was configured as a
|
||||||
# slave by rpl_init.inc
|
# slave by rpl_init.inc, for example start_slave.inc or stop_slave.inc file.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# ==== Usage ====
|
# ==== Usage ====
|
||||||
@ -14,6 +14,20 @@
|
|||||||
# $rpl_source_file
|
# $rpl_source_file
|
||||||
# The file that will be sourced.
|
# The file that will be sourced.
|
||||||
#
|
#
|
||||||
|
# $rpl_server_count
|
||||||
|
# The number of servers to configure. If this is not set, the largest
|
||||||
|
# number in $rpl_topology will be used.
|
||||||
|
# This parameter is obtained from rpl_init.inc.
|
||||||
|
#
|
||||||
|
# $rpl_master_list
|
||||||
|
# This parameter is calculated from within rpl_init.inc.
|
||||||
|
#
|
||||||
|
# $rpl_server_count_length
|
||||||
|
# Set to LENGTH($rpl_server_count). So if $rpl_server_count < 10,
|
||||||
|
# then $rpl_server_count_length = 1; if 10 <= $rpl_server_count <
|
||||||
|
# 100, then $rpl_server_count_length = 2, etc.
|
||||||
|
# This parameter is calculated from within rpl_change_topology.inc.
|
||||||
|
#
|
||||||
# $rpl_debug
|
# $rpl_debug
|
||||||
# See include/rpl_init.inc
|
# See include/rpl_init.inc
|
||||||
|
|
||||||
|
@ -32,8 +32,9 @@
|
|||||||
#
|
#
|
||||||
# (It is allowed, but not required, to configure SERVER_MYPORT_1
|
# (It is allowed, but not required, to configure SERVER_MYPORT_1
|
||||||
# and SERVER_MYPORT_2 too. If these variables are not set, the
|
# and SERVER_MYPORT_2 too. If these variables are not set, the
|
||||||
# variables MASTER_MYPORT and SLAVE_MYPORT, configured in the
|
# variables MASTER_MYPORT and SLAVE_MYPORT are used instead.
|
||||||
# default my.cnf used by the rpl suite, are used instead.)
|
# These variables are configured in the rpl_1slave_base.cnf,
|
||||||
|
# that is used in the default my.cnf, which is used by the rpl suite.)
|
||||||
#
|
#
|
||||||
# 2. Execute the following near the top of the test:
|
# 2. Execute the following near the top of the test:
|
||||||
#
|
#
|
||||||
@ -193,18 +194,30 @@ if ($rpl_check_server_ids)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# $rpl_master_list must be set so that include/rpl_change_topology.inc
|
if ($rpl_debug)
|
||||||
# knows which servers are initialized and not.
|
{
|
||||||
|
--echo ---- Check the topology and call CHANGE MASTER ----
|
||||||
|
}
|
||||||
|
|
||||||
|
# $rpl_master_list must be set so that include/rpl_change_topology.inc and later
|
||||||
|
# include/rpl_for_each_slave.inc knows which servers are initialized and not.
|
||||||
--let $rpl_master_list= `SELECT REPEAT('x', $rpl_server_count * LENGTH($rpl_server_count))`
|
--let $rpl_master_list= `SELECT REPEAT('x', $rpl_server_count * LENGTH($rpl_server_count))`
|
||||||
--source include/rpl_change_topology.inc
|
--source include/rpl_change_topology.inc
|
||||||
|
|
||||||
|
|
||||||
if (!$rpl_skip_start_slave)
|
if (!$rpl_skip_start_slave)
|
||||||
{
|
{
|
||||||
|
if ($rpl_debug)
|
||||||
|
{
|
||||||
|
--echo ---- Start slaves ----
|
||||||
|
}
|
||||||
--source include/rpl_start_slaves.inc
|
--source include/rpl_start_slaves.inc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($rpl_debug)
|
||||||
|
{
|
||||||
|
--echo ---- Set connection to the server_1 ----
|
||||||
|
}
|
||||||
--let $rpl_connection_name= server_1
|
--let $rpl_connection_name= server_1
|
||||||
--source include/rpl_connection.inc
|
--source include/rpl_connection.inc
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#
|
#
|
||||||
# $slave_timeout
|
# $slave_timeout
|
||||||
# Set the timeout when waiting for slave threads to stop and
|
# Set the timeout when waiting for slave threads to stop and
|
||||||
# start, respectively. See include/wait_for_slave_param.inc
|
# start, respectively. See include/wait_for_slave_param.inc
|
||||||
|
|
||||||
|
|
||||||
--let $include_filename= rpl_start_slaves.inc
|
--let $include_filename= rpl_start_slaves.inc
|
||||||
|
@ -14,13 +14,14 @@
|
|||||||
#
|
#
|
||||||
# Parameters:
|
# Parameters:
|
||||||
# $slave_timeout
|
# $slave_timeout
|
||||||
# See include/wait_for_slave_param.inc
|
# Timeout used when waiting for the slave IO thread to start.
|
||||||
|
# See include/wait_for_slave_param.inc.
|
||||||
#
|
#
|
||||||
# $rpl_allow_error
|
# $rpl_allow_error
|
||||||
# By default, this file fails if there is an error in the IO
|
# By default, this file fails if there is an error in the IO
|
||||||
# thread. However, the IO thread can recover and reconnect after
|
# thread. However, the IO thread can recover and reconnect after
|
||||||
# certain errors. If such an error is expected, can set
|
# certain errors. If such an error is expected, can set
|
||||||
# $rpl_allow_error=1. This will prevent this file from failing if
|
# $rpl_allow_error=1. This will prevent this file from failing if
|
||||||
# there is an error in the IO thread.
|
# there is an error in the IO thread.
|
||||||
#
|
#
|
||||||
# $rpl_debug
|
# $rpl_debug
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#
|
#
|
||||||
# Parameters:
|
# Parameters:
|
||||||
# $slave_timeout
|
# $slave_timeout
|
||||||
|
# Timeout used when waiting for the slave SQL thread to start.
|
||||||
# See include/wait_for_slave_param.inc
|
# See include/wait_for_slave_param.inc
|
||||||
#
|
#
|
||||||
# $rpl_debug
|
# $rpl_debug
|
||||||
@ -25,7 +26,7 @@ let $slave_param= Slave_SQL_Running;
|
|||||||
let $slave_param_value= Yes;
|
let $slave_param_value= Yes;
|
||||||
|
|
||||||
# Unfortunately, the slave sql thread sets Slave_SQL_Running=Yes
|
# Unfortunately, the slave sql thread sets Slave_SQL_Running=Yes
|
||||||
# *before* it clears Last_SQL_Errno. So we have to allow errors in
|
# *before* it clears Last_SQL_Errno. So we have to allow errors in
|
||||||
# the SQL thread here.
|
# the SQL thread here.
|
||||||
|
|
||||||
#--let $slave_error_param= Last_SQL_Errno
|
#--let $slave_error_param= Last_SQL_Errno
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
#
|
#
|
||||||
# Parameters:
|
# Parameters:
|
||||||
# $slave_timeout
|
# $slave_timeout
|
||||||
|
# Timeout used when waiting for the slave threads to start.
|
||||||
# See include/wait_for_slave_param.inc
|
# See include/wait_for_slave_param.inc
|
||||||
#
|
#
|
||||||
# $rpl_debug
|
# $rpl_debug
|
||||||
|
Reference in New Issue
Block a user