diff options
Diffstat (limited to 'mysql-test/t/rpl_loaddata.test')
-rw-r--r-- | mysql-test/t/rpl_loaddata.test | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/rpl_loaddata.test b/mysql-test/t/rpl_loaddata.test index 061066c7a31..478d4b75a36 100644 --- a/mysql-test/t/rpl_loaddata.test +++ b/mysql-test/t/rpl_loaddata.test @@ -13,6 +13,10 @@ source include/master-slave.inc; +connection slave; +reset master; +connection master; + create table t1(a int not null auto_increment, b int, primary key(a) ); load data infile '../../std_data/rpl_loaddata.dat' into table t1; @@ -28,6 +32,14 @@ sync_with_master; select * from t1; select * from t3; +# We want to be sure that LOAD DATA is in the slave's binlog. +# But we can't simply read this binlog, because as the slave has not been +# restarted for this test, the file_id is uncertain (would cause test +# failures). So instead, we test if the binlog looks long enough to +# contain LOAD DATA. That is, I (Guilhem) have done SHOW BINLOG EVENTS on my +# machine, saw that the binlog is of size 964 when things go fine. +# If LOAD DATA was not logged, the binlog would be shorter. +show master status; connection master; @@ -39,6 +51,9 @@ create table t1(a int, b int, unique(b)); save_master_pos; connection slave; sync_with_master; + +# See if slave stops when there's a duplicate entry for key error in LOAD DATA + insert into t1 values(1,10); connection master; |