Bug #1056 mysqldumps can't be executed in ANSI mode?
Submitted: 15 Aug 2003 16:58 Modified: 8 Sep 2003 1:34
Reporter: [ name withheld ] Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: mysqldump Command-line Client Severity:S3 (Non-critical)
Version:4.0.13 OS:Any (any)
Assigned to: Bugs System CPU Architecture:Any

[15 Aug 2003 16:58] [ name withheld ]
Description:
Per http://drupal.org/node/view/893, it appears mysqldump exports the following header:

-- MySQL dump 9.08
--
-- Host: localhost    Database: dbname
---------------------------------------------------------
-- Server version   4.0.13-log
...

If you are running MySQL in --ansi mode, you will receive an error if you try to execute this file, due to the lack of a space in the "---------------------------------------------------------" line.

How to repeat:
mysqld --ansi &
mysqldump database | mysql

Suggested fix:
Fix mysqldump to not output -------...
[22 Aug 2003 8:14] Indrek Siitan
Thanks for the bug report. The bug indeed exists, but actually your
"how-to-repeat" section doesn't prove the problem, since we discovered
another problem while debugging this - the "mysql" client handles these
comments, which shouldn't be allowed by standard, and does not send
them to server.

We'll definitely fix mysqldump, and we're looking at a way to handle the
problem with the "mysql" client so it doesn't break for millions and
millions of users.
[8 Sep 2003 1:34] Victor Vagin
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

added space after first '--' in the long '----....' comment line in mysqldump 
just to make it compatible with the manual