Re: using of mysqldump V 8.22 and table names with special character #

Sergei Golubchik <[email protected]>
Newsgroups gmane.comp.db.mysql.bugs
Message-ID <[email protected]>
Hi!

On Mar 19, Rik van Druten wrote:
> I've noticed a problem and cannot resolve it:
> 
> It's possible to create a table with a column name like '#s'. Making of the 
> mysqldump wil work als expected. But when I'll try to put the generetad SQL 
> back into mysql. I'll get a syntax error 1064 at line.
> 
> I'll think the parser has a problem with the # character. I couldn't find 
> the right solution for this problem.
> 
> example:
> 
> CREATE TABLE uits2 (
> klant_id int(11) NOT NULL default '0',
> naam char(81) NOT NULL default '',
> #'i` bigint(21) NOT NULL default '0',
> geen_einde double(17,0) default NULL ) TYPE=MyISAM;

% mysqldump --help
...
  -Q, --quote-names   Quote table and column names with backticks (`).
...

You should use --quote-names in mysqldump (unless your server is at
least 4.1.2) if you have non-alphanumeric characters in identifiers.

Regards,
Sergei

-- 
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik <[email protected]>
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, Senior Software Developer
/_/  /_/\_, /___/\___\_\___/  Osnabrueck, Germany
       <___/  www.mysql.com

-- 
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.