2003-08-20 23:24:45 +02:00
|
|
|
# See if the slave logs (in its own binlog, with --log-slave-updates) a
|
|
|
|
# replicated LOAD DATA INFILE correctly when it has binlog_*_db rules.
|
|
|
|
# This is for BUG#1100 (LOAD DATA INFILE was half-logged).
|
|
|
|
|
2005-12-22 06:39:02 +01:00
|
|
|
-- source include/have_binlog_format_statement.inc
|
|
|
|
-- source include/master-slave.inc
|
|
|
|
|
2003-08-20 23:24:45 +02:00
|
|
|
connection slave;
|
2005-12-22 06:39:02 +01:00
|
|
|
# Not sure why we connect to slave and then try to reset master, but I will leave it [JBM]
|
2003-08-20 23:24:45 +02:00
|
|
|
reset master;
|
|
|
|
|
|
|
|
connection master;
|
|
|
|
# 'test' is the current database
|
2005-12-22 06:39:02 +01:00
|
|
|
create table test.t1(a int, b int, unique(b));
|
2006-01-24 08:30:54 +01:00
|
|
|
load data infile '../std_data_ln/rpl_loaddata.dat' into table test.t1;
|
2003-08-20 23:24:45 +02:00
|
|
|
|
|
|
|
# Test logging on slave;
|
|
|
|
|
|
|
|
save_master_pos;
|
|
|
|
connection slave;
|
|
|
|
sync_with_master;
|
2005-12-22 06:39:02 +01:00
|
|
|
select count(*) from test.t1; # check that LOAD was replicated
|
|
|
|
--replace_column 2 # 5 #
|
2006-02-24 16:19:55 +01:00
|
|
|
--replace_regex /table_id: [0-9]+/table_id: #/
|
2005-12-22 06:39:02 +01:00
|
|
|
show binlog events from 102; # should be nothing
|
2006-02-13 19:03:12 +01:00
|
|
|
|
|
|
|
# Cleanup
|
|
|
|
connection master;
|
|
|
|
drop table test.t1;
|
|
|
|
sync_slave_with_master;
|