Bug #13848 mysqldump backwards incompatibility
Submitted: 7 Oct 2005 16:06 Modified: 26 May 2008 15:44
Reporter: Shane Allen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version:5.0.13 OS:Linux (linux)
Assigned to: CPU Architecture:Any

[7 Oct 2005 16:06] Shane Allen
Description:
At the end of a create table definition, you can end up with:

ENGINE=MyISAM DEFAULT CHARSET=latin1

which breaks backwards compatilibity with 4.x releases. Also, the 

timestamp NOT NULL default ...

breaks backwards compatibility. Given the effort to preserve backwards compatibility of mysqldump format (by wrapping a lot of other things in /*!40101 */ tags), it almost seems like a bug that the same hasn't done for these items.

I think it's more of a feature request, though, so I added it at that pri. Feel free to change the pri if you agree.

How to repeat:
create a database in 5.0, mysqldump --opt -Q -A > file.sql, and look at the output. Several 4.1 and 5.0 related changes are not wrapped in comment tags, most notably:

timestamp defaults/CURRENT_TIMESTAMP
CREATE TABLE ... DEFAULT CHARSET

Suggested fix:
wrap the output in /*!ver */ tags
[26 May 2008 15:44] Sveta Smirnova
Thank you for the report.

But this feature already implemented. Please use --compatible option: http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html#option_mysqldump_compatible