Bug #50728 mysqldump error with whitespace in table name
Submitted: 29 Jan 2010 12:24 Modified: 9 Feb 2010 11:27
Reporter: Martin Pirringer Email Updates:
Status: Closed Impact on me:
Category:MySQL Workbench: Administration Severity:S3 (Non-critical)
Version:5.2.15 OS:Any
Assigned to: Alfredo Kojima CPU Architecture:Any
Tags: mysqldump, table name, whitespace

[29 Jan 2010 12:24] Martin Pirringer
If you have  table with a space in the name like `invoice detail` mysqldump.exe will fail as follows:

\07:09:29 Dumping mydb (invoice detail)

Running: mysqldump.exe --defaults-extra-file=c:\users\myuser\appdata\local\temp\tmpk7zw2g  --no-create-info=FALSE --order-by-primary=FALSE --force=FALSE --no-data=FALSE --tz-utc=TRUE --flush-privileges=FALSE --compress=FALSE --replace=FALSE --host= --insert-ignore=FALSE --extended-insert=TRUE --user=admin --quote-names=TRUE --hex-blob=FALSE --complete-insert=FALSE --port=3306 --disable-keys=TRUE --delayed-insert=FALSE --delete-master-logs=FALSE --routines=TRUE --comments=TRUE --add-locks=TRUE --flush-logs=FALSE --dump-date=TRUE --allow-keywords=FALSE --create-options=TRUE --events=FALSE mydb invoice detail 

Operation failed with exitcode 6

mysqldump: Couldn't find table: "invoice"

Somewhere along the lines it seems to drop the "`" 

How to repeat:
create a table `invoice detail` and then try to dump the database

Suggested fix:
Check for the "`" around table names to allow white space
[29 Jan 2010 13:14] Valeriy Kravchuk
Thank you for the bug report. Verified just as described.
[30 Jan 2010 1:32] Alfredo Kojima
Quotes are now added to mysqldump parameters for both schema names and table names.
[1 Feb 2010 16:30] Johannes Taxacher
dumping tables that includes WS in names are now processed properly.
will be included in 5.2.16
[9 Feb 2010 11:27] Tony Bedford
An entry has been added to the 5.2.16 changelog:

In the Data Dump facility of the Administrator, attempting to export a schema to disk failed if a table name contained a space.