7 messages in com.mysql.lists.bugsRe: mysqldump SQL error on table name...
FromSent OnAttachments
mysq...@ragweed.net16 Jul 2002 11:28 
Sinisa Milivojevic16 Jul 2002 12:44 
mysq...@ragweed.net16 Jul 2002 13:27 
Arthur Fuller16 Jul 2002 15:59 
mysq...@ragweed.net16 Jul 2002 19:11 
Sinisa Milivojevic17 Jul 2002 04:37 
Sinisa Milivojevic17 Jul 2002 04:40 
Subject:Re: mysqldump SQL error on table named 'table'
From:Sinisa Milivojevic (sin@mysql.com)
Date:07/17/2002 04:40:35 AM
List:com.mysql.lists.bugs

mysq@ragweed.net writes:

As a test, I created a new database (bunk) with a single table called 'table', one field, type text. The outcome is the same regardless of the '--all-databases --opt' arguments.

Started mysql with --log=/var/log/mysql.log -

-----

# /opt/mysql/bin/mysqldump bunk > something.dump /opt/mysql/bin/mysqldump: Can't get info about table: 'table' error: You have an error in your SQL syntax near 'table' at line 1 And the log contents -

----- /opt/mysql/libexec/mysqld, Version: 3.23.51-log, started with: Tcp port: 3306 Unix socket: /tmp/mysql.sock Time Id Command Argument 020716 15:18:36 4 Connect root@localhost on 4 Init DB bunk 4 Query show tables 4 Query SET OPTION SQL_QUOTE_SHOW_CREATE=0 4 Query show create table `table` 4 Query show fields from table 4 Quit

Sorry, upon closer scrutiny I realised you used a reserved word for your table name.

You can circumvent a problem by adding --quote-names in mysqldump options.