2
# check replication of load data with the server parameters subjected to
3
# read_buffer_size > max_allowed_packet
5
# BUG#30435 loading large LOAD DATA INFILE breaks slave with
6
# read_buffer_size set on master
7
# BUG#33413 show binlog events fails if binlog has event size of close
8
# to max_allowed_packet
10
source include/have_binlog_format_mixed_or_statement.inc;
11
source include/master-slave.inc;
12
source include/have_innodb.inc;
13
source include/have_binlog_format_mixed_or_statement.inc;
17
create table t1 (id int not null primary key auto_increment);
21
eval insert into t1 values (null);
24
eval select * into outfile '$MYSQLTEST_VARDIR/tmp/bug30435_5k.txt' from t1;
29
create table t2 (id int not null primary key auto_increment);
31
select @@session.read_buffer_size - @@session.max_allowed_packet > 0 ;
33
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
34
eval load data infile '$MYSQLTEST_VARDIR/tmp/bug30435_5k.txt' into table t2;
35
select count(*) from t2 /* 5 000 */;
37
# the binglog will show fragmented Append_block events
38
--let $binlog_start=107
39
--replace_column 2 # 4 # 5 #
40
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/
41
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR $binlog_start <binlog_start>
42
--eval show binlog events in 'master-bin.000002' from $binlog_start
45
sync_slave_with_master;
47
select count(*) from t2 /* 5 000 */;
51
sync_slave_with_master;
52
remove_file $MYSQLTEST_VARDIR/tmp/bug30435_5k.txt;
54
--echo end of the tests