Bug #3247 a partially completed LOAD DATA INFILE is not executed at all on the slave
Submitted: 21 Mar 2004 5:46 Modified: 4 Apr 2005 8:28
Reporter: Guilhem Bichot Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S2 (Serious)
Version:4.0 OS:Any (all)
Assigned to: Guilhem Bichot CPU Architecture:Any

[21 Mar 2004 5:46] Guilhem Bichot
Description:
If a LOAD DATA INFILE fails (duplicate entry for index, or killed), but it has permanently inserted some rows (because we are not using transactions), then the slave simply silently skips the LOAD DATA INFILE, which makes the data different on master and slave.

How to repeat:
on master:
create table u (a int not null primary key);
have a file which contains 2 rows: 1 and 1, and do
load data infile 'this_file' into table u;
then 1 is inserted into 'u', but nothing is inserted on the slave.

Suggested fix:
Either store the error code in the Load_log_event, like we do for Query_log_event, or store exactly the loaded rows into the binary log.
[30 Jul 2004 21:17] Guilhem Bichot
Deferred to MySQL >= 5.0 (needs a new binary log format).
[24 Mar 2005 22:05] Guilhem Bichot
Working on fixing it in 5.0.4.
[25 Mar 2005 13:51] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/23374
[4 Apr 2005 8:28] Guilhem Bichot
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Fixed in 5.0.4; changelog already updated.