7 messages in com.mysql.lists.bugsRe: mysqldump SQL error on table name...| From | Sent On | Attachments |
|---|---|---|
| mysq...@ragweed.net | 16 Jul 2002 11:28 | |
| Sinisa Milivojevic | 16 Jul 2002 12:44 | |
| mysq...@ragweed.net | 16 Jul 2002 13:27 | |
| Arthur Fuller | 16 Jul 2002 15:59 | |
| mysq...@ragweed.net | 16 Jul 2002 19:11 | |
| Sinisa Milivojevic | 17 Jul 2002 04:37 | |
| Sinisa Milivojevic | 17 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.
-- Regards, __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic <sin...@mysql.com> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus <___/ www.mysql.com




