mirror of
https://github.com/MariaDB/server.git
synced 2026-04-20 07:15:33 +02:00
Merge two patches for bug 56895 into tip of mysql-5.1 branch.
This commit is contained in:
commit
9c2370c25a
148 changed files with 630 additions and 206 deletions
43
mysql-test/include/restart_slave_sql.inc
Normal file
43
mysql-test/include/restart_slave_sql.inc
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
# ==== Purpose ====
|
||||
#
|
||||
# Provide a earier way to restart SQL thread when you want to stop sql thread
|
||||
# and then start it immediately.
|
||||
#
|
||||
# Sources stop_slave_sql.inc to stop SQL thread on the current connection.
|
||||
# Then issues START SLAVE SQL_THREAD and then waits until
|
||||
# the SQL threads have started, or until a timeout is reached.
|
||||
#
|
||||
# Please use this instead of 'STOP|START SLAVE SQL_THREAD', to reduce the risk of
|
||||
# test case bugs.
|
||||
#
|
||||
#
|
||||
# ==== Usage ====
|
||||
#
|
||||
# [--let $slave_timeout= NUMBER]
|
||||
# [--let $rpl_debug= 1]
|
||||
# --source include/restart_slave_sql.inc
|
||||
#
|
||||
# Parameters:
|
||||
# $slave_timeout
|
||||
# See include/wait_for_slave_param.inc
|
||||
#
|
||||
# $rpl_debug
|
||||
# See include/rpl_init.inc
|
||||
|
||||
|
||||
--let $include_filename= restart_slave.inc
|
||||
--source include/begin_include_file.inc
|
||||
|
||||
|
||||
if (!$rpl_debug)
|
||||
{
|
||||
--disable_query_log
|
||||
}
|
||||
|
||||
source include/stop_slave_sql.inc;
|
||||
START SLAVE SQL_THREAD;
|
||||
source include/wait_for_slave_sql_to_start.inc;
|
||||
|
||||
|
||||
--let $include_filename= restart_slave.inc
|
||||
--source include/end_include_file.inc
|
||||
2
mysql-test/include/rpl_connection_master.inc
Normal file
2
mysql-test/include/rpl_connection_master.inc
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
let $rpl_connection_name= master;
|
||||
source include/rpl_connection.inc;
|
||||
2
mysql-test/include/rpl_connection_slave.inc
Normal file
2
mysql-test/include/rpl_connection_slave.inc
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
let $rpl_connection_name= slave;
|
||||
source include/rpl_connection.inc;
|
||||
2
mysql-test/include/rpl_connection_slave1.inc
Normal file
2
mysql-test/include/rpl_connection_slave1.inc
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
let $rpl_connection_name= slave1;
|
||||
source include/rpl_connection.inc;
|
||||
|
|
@ -45,15 +45,7 @@ if ($rpl_server_parameters)
|
|||
--source include/rpl_connection.inc
|
||||
|
||||
# Write file to make mysql-test-run.pl start up the server again
|
||||
--let WRITE_TO_FILE= $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
|
||||
--let WRITE_TO_VAR= $_rpl_start_server_command
|
||||
perl;
|
||||
my $file= $ENV{'WRITE_TO_FILE'};
|
||||
my $var= $ENV{'WRITE_TO_VAR'};
|
||||
open WRITE_FILE, ">> $file" or die "Error opening $file: $!";
|
||||
print WRITE_FILE $var, "\n" or die "Error appending to $file: $!";
|
||||
close WRITE_FILE or die "Error closing $file: $!";
|
||||
EOF
|
||||
--exec echo "$_rpl_start_server_command" > $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
|
||||
|
||||
--source include/rpl_reconnect.inc
|
||||
|
||||
|
|
|
|||
|
|
@ -44,9 +44,7 @@ if ($rpl_debug)
|
|||
|
||||
# Write file to make mysql-test-run.pl expect the "crash", but don't start
|
||||
# it until it's told to
|
||||
--append_file $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
|
||||
wait
|
||||
EOF
|
||||
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
|
||||
|
||||
# Send shutdown to the connected server and give
|
||||
# it 10 seconds to die before zapping it
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue