Bug #10877 mysqldump should use consistent last line
Submitted: 26 May 2005 10:11 Modified: 15 Aug 2006 5:35
Reporter: Carsten Pedersen
Status: Closed
Category:Client Severity:S4 (Feature request)
Version: OS:
Assigned to: Magnus Svensson Target Version:
Triage: D5 (Feature request)

[26 May 2005 10:11] Carsten Pedersen
Description:
to enable the dba to check whether a mysqldump file is complete, a line should be added at
the end of the dump to mark it complete; something like

-- MySQL dump 10.10 completed on 2005-05-26

How to repeat:
this is a feature request, not a bug
[5 Oct 2005 18:26] Hartmut Holzgraefe
These are actually two new features:
1) end marker comment
2) time stamps

i think both  make sense, just wondering whether timestamps in the file 
header and footer should be enabled by default?
[6 Oct 2005 8:53] Carsten Pedersen
I don't see why not - it's not something that will be parsed by mysql on re-loading, so I
don't see how it would break anything.
[23 Jul 2006 20:37] Magnus Svensson
Added code to print output as requested 

Ex:
-- MySQL dump 10.10 completed Sun Jul 23 20:37:10 2006
[23 Jul 2006 20:41] 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/commits/9463
[24 Jul 2006 10:56] 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/commits/9478
[3 Aug 2006 18:41] Magnus Svensson
Pushed to 5.0.25
[3 Aug 2006 20:17] Paul DuBois
Noted in 5.0.25 changelog.

For a successful dump, mysqldump now writes a SQL comment to the end
of the dump file in the following format:

-- Dump completed on YYYY-MM-DD hh:mm:ss
[14 Aug 2006 22:44] Konstantin Osipov
Merged into 5.1.12
[15 Aug 2006 5:35] Paul DuBois
Noted in 5.1.12 changelog.
[23 Dec 2006 8:46] Alex W
This new feature broke my source control scripts; I can no longer tell if two dumps are
the same content-wise, since the "last modified" line is always different. 

I'd hate to write tools to kill that last line manually. Please include an option to
mysqldump to show that last line or not, and disable this new feature by default (for back
compat reasons). 

Thanks!
-Alex
[15 Jan 2007 11:03] Magnus Svensson
Sorry, that is too bad.

This bug has been close, please file a new bug with higher priority referencing this and
we will see what can be done.
[16 Jul 2007 11:22] Nick Jenkins
This just broke my scripts too: I archive & compress database backups, and when data has
not changed I used to be able to delete an archived copy. With this, I can no longer
trivially tell whether a backup has changed or not. I could not see a bug covering this
(don't know if one got logged or not), so I have logged it as bug #29815.
[15 Nov 2007 15:41] Paul DuBois
For those who'd like to suppress the dump date in the "-- Dump complete" line, a
--skip-dump-date option is available as of MySQL 5.0.52/5.1.23. See Bug#31077.