File: rpl_cant_read_event_incident.test

package info (click to toggle)
mysql-5.5 5.5.60-0%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 201,012 kB
  • sloc: cpp: 648,063; ansic: 552,041; perl: 48,017; pascal: 25,099; sh: 15,065; yacc: 13,088; cs: 4,647; xml: 4,178; sql: 3,380; makefile: 1,368; lex: 639; awk: 54
file content (70 lines) | stat: -rw-r--r-- 1,962 bytes parent folder | download | duplicates (4)
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
#
# Bug#11747416 : 32228 	A disk full makes binary log corrupt.
#
# 
# The test demonstrates reading from binlog error propagation to slave 
# and reporting there.
# Conditions for the bug include a crash at time of the last event to
# the binlog was written partly. With the fixes the event is not sent out 
# any longer, but rather the dump thread sends out a sound error message.
# 
# Crash is not simulated. A binlog with partly written event in its end is installed
# and replication is started from it.
#

--source include/master-slave.inc
--source include/have_binlog_format_mixed.inc

call mtr.add_suppression("Error in Log_event::read_log_event()");

--connection master
--let $datadir= `SELECT @@datadir`

--let $rpl_server_number= 1
--source include/rpl_stop_server.inc

--remove_file $datadir/master-bin.000001
--copy_file $MYSQL_TEST_DIR/std_data/bug11747416_32228_binlog.000001 $datadir/master-bin.000001

--let $rpl_server_number= 1
--source include/rpl_start_server.inc

--source include/wait_until_connected_again.inc

# evidence of the partial binlog
--error ER_ERROR_WHEN_EXECUTING_COMMAND
show binlog events;

--connection slave
call mtr.add_suppression("Slave I/O: Got fatal error 1236 from master when reading data from binary log");
stop slave;
reset slave;
start slave;

# ER_MASTER_FATAL_ERROR_READING_BINLOG 1236
--let $slave_param=Last_IO_Errno
--let $slave_param_value=1236
--source include/wait_for_slave_param.inc

--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

#
# Cleanup
#

--connection master
reset master;

--connection slave
stop slave;
reset slave;
# Table was created from binlog, it may not be created if SQL thread is running
# slowly and IO thread reaches incident before SQL thread applies it.
drop table if exists t;
reset master;

--echo End of the tests
--let $rpl_only_running_threads= 1
--source include/rpl_end.inc