Bug #2284 mysqldump does not quote fieldnames containing spaces
Submitted: 5 Jan 2004 7:28 Modified: 5 Jan 2004 11:03
Reporter: Lee Leahu Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.0.16 OS:Linux (gentoo linux)
Assigned to: CPU Architecture:Any

[5 Jan 2004 7:28] Lee Leahu
Description:
mysqldump does not quote fieldnames containing spaces. 
 
CU_SECOND CONTACT varchar(50) default NULL, 
 
 

How to repeat:
mysqldump --opt -u <username> -p<password> <db name> > <db dump file> 
 

Suggested fix:
fieldnames containing spaces should be quoted properly
[5 Jan 2004 7:36] 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 11:03] Sergei Golubchik
duplicate of #2281