Bug #2281 mysqldump doesn't quote variables with a '-' in their name
Submitted: 5 Jan 2004 4:40 Modified: 14 Jan 2004 2:50
Reporter: Adam Langley Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: mysqldump Command-line Client Severity:S3 (Non-critical)
Version:4.0.16 OS:
Assigned to: Sergei Golubchik CPU Architecture:Any

[5 Jan 2004 4:40] Adam Langley
Description:
Variables with a '-' in their name need to be quoted in backticks. mysqldump fails to do this.

How to repeat:
Use mysqldump to dump a table which has variables that have a '-' in their name.

Suggested fix:
Quote the strings correctly.
[5 Jan 2004 7:35] MySQL Verification Team
Please us proper option for this:

 ./client/mysqldump --quote-names bug
-- MySQL dump 9.10
--
-- Host: localhost    Database: bug
-- ------------------------------------------------------
-- Server version       4.0.18-debug

--
-- Table structure for table `t1-t2`
--

CREATE TABLE `t1-t2` (
  `c1-cw` int(11) default NULL,
  `a b` int(11) default NULL,
  `id` int(11) default NULL
) TYPE=MyISAM;

--
-- Dumping data for table `t1-t2`
--
[5 Jan 2004 15:55] Sergei Golubchik
bug confirmed. But it's a not very critical issue, as there is a simple workaround: --quote-names switch of mysqldump.
[14 Jan 2004 2:50] Sergei Golubchik
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

Additional info:

fixed in 4.1.2