Bug #2469 Error when dumping tables with specific string in name
Submitted: 21 Jan 2004 8:11 Modified: 26 Jan 2004 13:01
Reporter: Romuald Brunet Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S2 (Serious)
Version:4.0.16 OS:Linux (Linux (Debian/unstable))
Assigned to: Dean Ellis CPU Architecture:Any

[21 Jan 2004 8:11] Romuald Brunet
Description:
When trying to dump a table with this "string" in the name, mysqldump raises an error and stops dumping.

String is :   \"

Error is:
mysqldump: Can't get info about table: `sample\"test`
error: Table 'databasename.sample"test' doesn't exist

I guess the antislash is interpreted somewhere.

Also, if a table name exists with the same name but without the antislash, the dump seems to be done correctly.

How to repeat:
create table `sample\"test` (id int(10));

Then,
mysqldump [-Q] [...] mydatabase;

-> The create table, then:
mysqldump: Can't get info about table: `sample\"test`
error: Table 'mydatabase.sample"test' doesn't exist

But:
create table `sample\"test` (id int(10));
create table `sample"test` (id int(10));

-> dump (seems correct)
[26 Jan 2004 13:01] Dean Ellis
I cannot create the table in order to test this because MySQL rejects it as an invalid table name:

mysql> create table `sample\"test` ( a int );
ERROR 1103: Incorrect table name 'sample\"test'

You are able to create this table using 4.0?
[26 Jan 2004 13:41] Romuald Brunet
I think I've made a mistake since the client is (was) 4.0.16, but our servers still use MySQL 3.23
Thanks for your time anyway.