/usr/lib/mysql-testsuite/include/rpl_reconnect.inc is in percona-server-test-5.6 5.6.22-rel71.0-0ubuntu4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | # ==== Purpose ====
#
# After a server has restarted, this waits for all clients configured
# by rpl_init.inc and/or master-slave.inc to reconnect again.
#
# For each connection, it issues this:
# --enable_reconnect
# --source include/wait_until_connected_again.inc
# --disable_reconnect
#
#
# ==== Usage ====
#
# --let $rpl_server_number= N
# [--let $rpl_extra_connections_per_server= 1]
# [--let $rpl_debug= 1]
# --source include/rpl_reconnect.inc
#
# Parameters:
# $rpl_server_number
# Number to identify the server that needs to reconnect. 1 is the
# master server, 2 the slave server, 3 the 3rd server, and so on.
# Cf. include/rpl_init.inc
#
# $rpl_extra_connections_per_server, $rpl_debug
# See include/rpl_init.inc
--let $include_filename= rpl_reconnect.inc
--source include/begin_include_file.inc
if (!$rpl_server_number)
{
--die ERROR IN TEST: you must set $rpl_server_number before you source rpl_connect.inc
}
if ($_rpl_extra_connections_per_server == '')
{
--let $_rpl_extra_connections_per_server= 1
}
if ($rpl_debug)
{
--echo ---- Enable reconnect ----
}
--let $_rpl_server_number= $rpl_server_number
--dec $_rpl_server_number
if (!$_rpl_server_number)
{
--let $rpl_connection_name= default
--source include/rpl_connection.inc
--enable_reconnect
--let $rpl_connection_name= master
--source include/rpl_connection.inc
--enable_reconnect
--let $rpl_connection_name= master1
--source include/rpl_connection.inc
--enable_reconnect
}
--dec $_rpl_server_number
if (!$_rpl_server_number)
{
--let $rpl_connection_name= slave
--source include/rpl_connection.inc
--enable_reconnect
--let $rpl_connection_name= slave1
--source include/rpl_connection.inc
--enable_reconnect
}
--let $rpl_connection_name= server_$rpl_server_number
--source include/rpl_connection.inc
--enable_reconnect
--let $_rpl_connection_number= 1
while ($_rpl_connection_number <= $_rpl_extra_connections_per_server)
{
--let $rpl_connection_name= server_$rpl_server_number$underscore$_rpl_connection_number
--source include/rpl_connection.inc
--enable_reconnect
--inc $_rpl_connection_number
}
if ($rpl_debug)
{
--echo ---- Wait for reconnect and disable reconnect on all connections ----
}
--let $_rpl_server_number= $rpl_server_number
--dec $_rpl_server_number
if (!$_rpl_server_number)
{
--let $rpl_connection_name= default
--source include/rpl_connection.inc
--source include/wait_until_connected_again.inc
--disable_reconnect
--let $rpl_connection_name= master
--source include/rpl_connection.inc
--source include/wait_until_connected_again.inc
--disable_reconnect
--let $rpl_connection_name= master1
--source include/rpl_connection.inc
--source include/wait_until_connected_again.inc
--disable_reconnect
}
--dec $_rpl_server_number
if (!$_rpl_server_number)
{
--let $rpl_connection_name= slave
--source include/rpl_connection.inc
--source include/wait_until_connected_again.inc
--disable_reconnect
--let $rpl_connection_name= slave1
--source include/rpl_connection.inc
--source include/wait_until_connected_again.inc
--disable_reconnect
}
--let $rpl_connection_name= server_$rpl_server_number
--source include/rpl_connection.inc
--source include/wait_until_connected_again.inc
--disable_reconnect
--let $_rpl_connection_number= 1
while ($_rpl_connection_number <= $_rpl_extra_connections_per_server)
{
--let $rpl_connection_name= server_$rpl_server_number$underscore$_rpl_connection_number
--source include/rpl_connection.inc
--source include/wait_until_connected_again.inc
--disable_reconnect
--inc $_rpl_connection_number
}
--let $include_filename= rpl_reconnect.inc
--source include/end_include_file.inc
|