rpl_loaddata_map.test 1.53 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
#
#  check replication of load data with the server parameters subjected to
#  read_buffer_size > max_allowed_packet
#
#  BUG#30435 loading large LOAD DATA INFILE breaks slave with 
#            read_buffer_size set on master
#  BUG#33413 show binlog events fails if binlog has event size of close
#            to max_allowed_packet

source include/master-slave.inc;
source include/have_innodb.inc;
12
source include/have_binlog_format_mixed_or_statement.inc;
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

--disable_query_log
let $rows= 5000;
create table t1 (id int not null primary key auto_increment);

while($rows)
{
  eval insert into t1 values (null);
  dec $rows;
}
eval select * into outfile '$MYSQLTEST_VARDIR/tmp/bug30435_5k.txt' from t1;
flush logs;
--enable_query_log

connection master;
create table t2 (id int not null primary key auto_increment);

unknown's avatar
unknown committed
30
select @@session.read_buffer_size - @@session.max_allowed_packet > 0 ;
31

unknown's avatar
unknown committed
32
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
33 34 35 36
eval load data infile '$MYSQLTEST_VARDIR/tmp/bug30435_5k.txt' into table t2;
select count(*) from t2 /* 5 000 */;

# the binglog will show fragmented Append_block events
37
--let $binlog_start=106
38
--replace_column 5 #
39
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /file_id=[0-9]+/file_id=#/
unknown's avatar
unknown committed
40
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
41 42 43 44 45 46 47 48 49 50 51 52 53
--eval show binlog events in 'master-bin.000002' from $binlog_start


sync_slave_with_master;
#connection slave;
select count(*) from t2 /* 5 000 */;

connection master;
drop table t1, t2;
sync_slave_with_master;
remove_file $MYSQLTEST_VARDIR/tmp/bug30435_5k.txt;

--echo end of the tests