Bug #56708 Delete an old file when Create_file_log_event::do_apply_event fails
Submitted: 10 Sep 2010 1:36 Modified: 28 May 2013 11:26
Reporter: Mikiya Okuno Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:5.1 OS:Any
Assigned to: Assigned Account CPU Architecture:Any

[10 Sep 2010 1:36] Mikiya Okuno
Description:
When Create_file_log_event::do_apply_event fails, the file remains in the tmpdir. However, such a file is useless because the file will not be reused.

How to repeat:
Execute LOAD DATA INFILE against a large file on the master with a slave using small tmpdir.

Suggested fix:
Issue my_delete() if the file copy fails.
[10 Sep 2010 1:38] MySQL Verification Team
Keeping a large file in tmpdir on the slave may prevents the slave from executing a complex query which requires tmp files such as huge filesorts.
[28 May 2013 11:26] Jon Stephens
Documented fix in the 5.7.2 changelog as follows:

      Temporary files created by LOAD DATA INFILE were not cleared if the
      statement failed.

Closed.