Bug #1073 | Replicating LOAD DATA INFILE mysqlbinlog does not cleanup tmp files | ||
---|---|---|---|
Submitted: | 18 Aug 2003 4:40 | Modified: | 10 Dec 2003 3:50 |
Reporter: | Peter Zaitsev (Basic Quality Contributor) | Email Updates: | |
Status: | Won't fix | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 4.0 | OS: | Any (all) |
Assigned to: | Victor Vagin | CPU Architecture: | Any |
[18 Aug 2003 4:40]
Peter Zaitsev
[18 Aug 2003 8:55]
Guilhem Bichot
> The mysqlbinlog does not seem to cleanup files in the temporary directory > properly at least in case of error condition. Presently it does not clear these files, in any case, true. If there's an error in 'mysql' (like in your example below) then who should delete it? Not 'mysql' (you don't want your client to delete your data files). Not 'mysqlbinlog' (it is the not the program which got the error). Even in the case where 'mysqlbinlog' has an error (which usually means a corrupted binlog), it should not delete the file: imagine the error is not related to LOAD stuff. > Even worse at subsequent runs it failes due to existing file (it shall > probably assign the new name in this case instead) This part makes sense. I am now assigning this bug to Victor, who recently fixed a lot of things with LOAD DATA & mysqlbinlog. He will know what we can and can't do, if we should consider this a bug or not. Thanks a lot, Victor. > pz@abyss:~/work/db> ls /tmp/ | grep gg > gg.sql > gg.txt > gg.txt-00000002 > > As you might see gg.txt-00000002 file is created and not cleaned up after > exit of mysqlbinlog It should not be cleaned up, at least in some cases: if you are running mysqlbinlog > file.sql and saving {file.sql and the attached gg.txt-00000002} for future use.
[10 Dec 2003 3:50]
Michael Widenius
In MySQL 4.0.16 we fixed that mysqlbinlog will notice if there was old temporary files and not reuse these names. We can't for the moment delete the temporary files as this will break mysqlbinlog usage. I did however update the manual about this. In the future we will fix this problem by allowing mysqlbinlog to connect directly to a mysqld server. In this case we can safely remove the log files when the logs has been applied.