Bug #82 LOAD DATA *LOCAL* INFILE is not properly written to the binary log
Submitted: 18 Feb 2003 14:07 Modified: 3 Mar 2003 5:52
Reporter: Guilhem Bichot Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Replication Severity:S2 (Serious)
Version:4.0 OS:Any (all)
Assigned to: Guilhem Bichot CPU Architecture:Any

[18 Feb 2003 14:07] Guilhem Bichot
When a client sends
the mysqld server only writes the beginning of the loaded file to the binary log (generally 8kb or 16kb) instead of writing the whole file as it should do.
The bug appears only when using LOCAL.
Consequences : the binary log cannot be used for replication, because the slave will insert less rows than the master did. Restoring with mysqlbinlog|mysql is also impossible.

How to repeat:
Load a big file (2MB for example) with
and check the size of the binary log. It's too small.

Suggested fix:
I have to write a patch.
[20 Feb 2003 7:14] Guilhem Bichot
Moreover, the logged part has its first row truncated 
(first character is missing). If you load
1	2
3	4
3	4
will be logged. Spoils replication then, of course.
[3 Mar 2003 5:52] Michael Widenius
Thank you for your bug report. This issue has been fixed in the latest
development tree for that product. You can find more information about
accessing our development trees at