mirror of
https://github.com/MariaDB/server.git
synced 2025-12-09 08:01:34 +03:00
merge from 5.5 repo.
This commit is contained in:
@@ -11,7 +11,7 @@ reset slave;
|
||||
start slave;
|
||||
include/wait_for_slave_param.inc [Last_IO_Errno]
|
||||
Last_IO_Errno = '1236'
|
||||
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'binlog truncated in the middle of event; consider out of disk space on master; the first event '' at XXX, the last event read from 'master-bin.000001' at XXX, the last byte read from 'master-bin.000001' at XXX.''
|
||||
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'binlog truncated in the middle of event; consider out of disk space on master; the first event '' at XXX, the last event read from './master-bin.000001' at XXX, the last byte read from './master-bin.000001' at XXX.''
|
||||
reset master;
|
||||
stop slave;
|
||||
reset slave;
|
||||
|
||||
@@ -270,6 +270,7 @@ Heartbeat event received
|
||||
include/rpl_reset.inc
|
||||
include/stop_slave.inc
|
||||
include/rpl_change_topology.inc [new topology=1->2->1]
|
||||
CHANGE MASTER TO MASTER_HEARTBEAT_PERIOD=1;
|
||||
include/start_slave.inc
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10));
|
||||
INSERT INTO t1 VALUES(1, 'on master');
|
||||
|
||||
@@ -9,7 +9,7 @@ change master to master_log_pos=MASTER_LOG_POS;
|
||||
Read_Master_Log_Pos = '75'
|
||||
start slave;
|
||||
include/wait_for_slave_io_error.inc [errno=1236]
|
||||
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master; the first event 'master-bin.000001' at XXX, the last event read from 'master-bin.000001' at XXX, the last byte read from 'master-bin.000001' at XXX.''
|
||||
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master; the first event 'master-bin.000001' at XXX, the last event read from './master-bin.000001' at XXX, the last byte read from './master-bin.000001' at XXX.''
|
||||
include/stop_slave_sql.inc
|
||||
show master status;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
|
||||
@@ -5,7 +5,7 @@ CREATE TABLE t1(c1 INT);
|
||||
FLUSH LOGS;
|
||||
call mtr.add_suppression('Got fatal error 1236 from master when reading data from binary log: .*could not find next log');
|
||||
include/wait_for_slave_io_error.inc [errno=1236]
|
||||
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'could not find next log; the first event 'master-bin.000001' at XXX, the last event read from 'master-bin.000002' at XXX, the last byte read from 'master-bin.000002' at XXX.''
|
||||
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'could not find next log; the first event 'master-bin.000001' at XXX, the last event read from './master-bin.000002' at XXX, the last byte read from './master-bin.000002' at XXX.''
|
||||
CREATE TABLE t2(c1 INT);
|
||||
FLUSH LOGS;
|
||||
CREATE TABLE t3(c1 INT);
|
||||
|
||||
@@ -37,7 +37,7 @@ DROP TABLE t1;
|
||||
CREATE TABLE t1 (f1 int PRIMARY KEY, f2 LONGTEXT, f3 LONGTEXT) ENGINE=MyISAM;
|
||||
INSERT INTO t1(f1, f2, f3) VALUES(1, REPEAT('a', @@global.max_allowed_packet), REPEAT('b', @@global.max_allowed_packet));
|
||||
include/wait_for_slave_io_error.inc [errno=1236]
|
||||
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master; the first event '' at XXX, the last event read from 'master-bin.000001' at XXX, the last byte read from 'master-bin.000001' at XXX.''
|
||||
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master; the first event '' at XXX, the last event read from './master-bin.000001' at XXX, the last byte read from './master-bin.000001' at XXX.''
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
RESET MASTER;
|
||||
|
||||
10
mysql-test/suite/rpl/r/rpl_start_stop_slave.result
Normal file
10
mysql-test/suite/rpl/r/rpl_start_stop_slave.result
Normal file
@@ -0,0 +1,10 @@
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
set @time_before_kill := (select CURRENT_TIMESTAMP);
|
||||
[Time before the query]
|
||||
[Connection ID of the slave I/O thread found]
|
||||
kill <connection_id>;
|
||||
set @time_after_kill := (select CURRENT_TIMESTAMP);
|
||||
[Time after the query]
|
||||
[Killing of the slave IO thread was successful]
|
||||
include/rpl_end.inc
|
||||
@@ -75,7 +75,7 @@ CHANGE MASTER TO master_log_pos=MASTER_POS;
|
||||
START SLAVE;
|
||||
include/wait_for_slave_param.inc [Last_IO_Errno]
|
||||
Last_IO_Errno = '1236'
|
||||
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position; the first event 'master-bin.000001' at XXX, the last event read from 'master-bin.000001' at XXX, the last byte read from 'master-bin.000001' at XXX.''
|
||||
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position; the first event 'master-bin.000001' at XXX, the last event read from './master-bin.000001' at XXX, the last byte read from './master-bin.000001' at XXX.''
|
||||
include/stop_slave.inc
|
||||
RESET SLAVE;
|
||||
RESET MASTER;
|
||||
|
||||
@@ -14,11 +14,6 @@
|
||||
|
||||
--source include/master-slave.inc
|
||||
--source include/have_binlog_format_mixed.inc
|
||||
#
|
||||
# Bug#13050593 swallows `\' from Last_IO_Error
|
||||
# todo: uncomment the filter once the bug is fixed.
|
||||
#
|
||||
--source include/not_windows.inc
|
||||
|
||||
call mtr.add_suppression("Error in Log_event::read_log_event()");
|
||||
|
||||
@@ -51,7 +46,7 @@ start slave;
|
||||
--let $slave_param_value=1236
|
||||
--source include/wait_for_slave_param.inc
|
||||
|
||||
--let $slave_io_error_replace= / at [0-9]*/ at XXX/ /\.\/*master-bin/master-bin/
|
||||
--let $slave_field_result_replace= / at [0-9]*/ at XXX/
|
||||
--let $status_items= Last_IO_Errno, Last_IO_Error
|
||||
--source include/show_slave_status.inc
|
||||
|
||||
|
||||
@@ -480,6 +480,12 @@ let $status_var_comparsion= >;
|
||||
--connection master
|
||||
#--replace_result $SLAVE_MYPORT SLAVE_PORT $slave_binlog SLAVE_BINLOG
|
||||
#eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$SLAVE_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=$connect_retry, MASTER_HEARTBEAT_PERIOD=1, MASTER_LOG_FILE='$slave_binlog';
|
||||
|
||||
# BUG#12403008 RPL_HEARTBEAT_BASIC FAILS SPORADICALLY ON PUSHBUILD
|
||||
# MASTER_HEARTBEAT_PERIOD had the default value (slave_net_timeout/2)
|
||||
# so wait on "Heartbeat event received on master", that only waits for
|
||||
# 1 minute, sometimes timeout before heartbeat arrives.
|
||||
CHANGE MASTER TO MASTER_HEARTBEAT_PERIOD=1;
|
||||
--source include/start_slave.inc
|
||||
|
||||
# Insert data on master and on slave and make sure that it replicated for both directions
|
||||
|
||||
@@ -23,8 +23,8 @@ source include/show_slave_status.inc;
|
||||
start slave;
|
||||
let $slave_io_errno= 1236;
|
||||
--let $show_slave_io_error= 1
|
||||
# Mask line numbers, and whether master-bin is preceded by "./" or "."
|
||||
--let $slave_io_error_replace= / at [0-9]*/ at XXX/ /\.\/*master-bin/master-bin/
|
||||
# Mask line numbers
|
||||
--let $slave_io_error_replace= / at [0-9]*/ at XXX/
|
||||
source include/wait_for_slave_io_error.inc;
|
||||
source include/stop_slave_sql.inc;
|
||||
|
||||
|
||||
@@ -61,8 +61,8 @@ connection slave;
|
||||
# 1236 = ER_MASTER_FATAL_ERROR_READING_BINLOG
|
||||
--let $slave_io_errno= 1236
|
||||
--let $show_slave_io_error= 1
|
||||
# Mask line numbers, and whether master-bin is preceded by "./" or "."
|
||||
--let $slave_io_error_replace= / at [0-9]*/ at XXX/ /\.\/*master-bin/master-bin/
|
||||
# Mask line numbers
|
||||
--let $slave_io_error_replace= / at [0-9]*/ at XXX/
|
||||
--source include/wait_for_slave_io_error.inc
|
||||
|
||||
connection master;
|
||||
|
||||
@@ -126,8 +126,8 @@ connection slave;
|
||||
# 1236=ER_MASTER_FATAL_ERROR_READING_BINLOG error message from master.
|
||||
--let $slave_io_errno= 1236
|
||||
|
||||
# Mask line numbers, and whether master-bin is preceded by "./" or "."
|
||||
--let $slave_io_error_replace= / at [0-9]*/ at XXX/ /\.\/*master-bin/master-bin/
|
||||
# Mask line numbers
|
||||
--let $slave_io_error_replace= / at [0-9]*/ at XXX/
|
||||
--source include/wait_for_slave_io_error.inc
|
||||
|
||||
# Remove the bad binlog and clear error status on slave.
|
||||
|
||||
44
mysql-test/suite/rpl/t/rpl_start_stop_slave.test
Normal file
44
mysql-test/suite/rpl/t/rpl_start_stop_slave.test
Normal file
@@ -0,0 +1,44 @@
|
||||
#
|
||||
#BUG#11752315 : STOP SLAVE UNABLE TO COMPLETE WHEN SLAVE THREAD IS TRYING
|
||||
# TO RECONNECT TO
|
||||
#
|
||||
# ==== Purpose ====
|
||||
#
|
||||
#Tests that the slave does not go to a sleep for a long duration after the
|
||||
#master is killed and we do a START_SLAVE and STOP_SLAVE.
|
||||
#
|
||||
# ==== Method ====
|
||||
#
|
||||
#This is a new functionality of having an interruptable sleep of the slave.
|
||||
#We find the thread id for the slave thread. On finding the thread ID of the
|
||||
#slave thread we kill the slave thread. A successful kill in less than 60 sec
|
||||
#should serve the purpose of checking the functionality.
|
||||
#
|
||||
|
||||
--source include/have_log_bin.inc
|
||||
--source include/master-slave.inc
|
||||
|
||||
connection slave;
|
||||
--let $connection_id=`SELECT id FROM information_schema.processlist where state LIKE 'Waiting for master to send event'`
|
||||
|
||||
set @time_before_kill := (select CURRENT_TIMESTAMP);
|
||||
|
||||
--echo [Time before the query]
|
||||
--echo [Connection ID of the slave I/O thread found]
|
||||
|
||||
--replace_regex /kill [0-9]*/kill <connection_id>/
|
||||
--eval kill $connection_id
|
||||
|
||||
set @time_after_kill := (select CURRENT_TIMESTAMP);
|
||||
|
||||
--echo [Time after the query]
|
||||
|
||||
if(`select TIMESTAMPDIFF(SECOND,@time_after_kill, @time_before_kill) > 60`)
|
||||
{
|
||||
--echo # assert : The difference between the timestamps 'time_after_kill' and 'time_before_kill' should be less than 60sec.
|
||||
--die
|
||||
}
|
||||
|
||||
--echo [Killing of the slave IO thread was successful]
|
||||
# End of test
|
||||
--source include/rpl_end.inc
|
||||
Reference in New Issue
Block a user