Bug #2235 mysqldump --compatible doesn't work correctly
Submitted: 29 Dec 2003 12:15 Modified: 19 Jan 2004 5:27
Reporter: Harrison Fisk Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: mysqldump Command-line Client Severity:S3 (Non-critical)
Version:4.1.1 OS:Linux (Linux (redhat 9))
Assigned to: Ramil Kalimullin CPU Architecture:Any

[29 Dec 2003 12:15] Harrison Fisk
Description:
mysqldump seems to ignore the --compatible option.  It seems to stem from an incorrect version comment that starts with /*!41000  which would mean for version 4.10.00 and above, but it should be 4.01.00 or /*!40100.  Fixing this seems to make --compatible work the way it should.

How to repeat:
mysqldump --compatible=oracle mysql

output will have the incorrect quoting style.

Suggested fix:
===== mysqldump.c 1.104 vs edited =====
--- 1.104/client/mysqldump.c    Tue Dec  9 06:28:33 2003
+++ edited/mysqldump.c  Mon Dec 29 15:10:47 2003
@@ -812,7 +812,7 @@
        char *end;
        uint i;
  
-       sprintf(buff, "/*!41000 SET @@sql_mode=\"");
+       sprintf(buff, "/*!40100 SET @@sql_mode=\"");
        end= strend(buff);
        for (i= 0; opt_compatible_mode; opt_compatible_mode>>= 1, i++)
        {
[19 Jan 2004 5:27] Ramil Kalimullin
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html