Stefano,
Friday, June 21, 2002, 4:43:29 PM, you wrote:

SI> I found the following problem, which I consider a bug, but maybe I'm missing 
something to make it work correctly.

SI> I'm using 'mysqldump' to backup our MySQL DB, and when I try to recover it on a 
blank DB it gives syntax errors while creating some table.
SI> This is the Table structure which cause the error :

[skip]

SI> When I try to run this command on the mysql console, I receive the following error 
:
SI> mysql> CREATE TABLE Test (
SI>     ->   ID int(10) unsigned NOT NULL auto_increment,
SI>     ->   IL varchar(12) NOT NULL default '',
SI>     ->   Item_ID int(10) unsigned NOT NULL default '0',
SI>     ->   BLDate datetime NOT NULL default '0000-00-00 00:00:00',
SI>     ->   RelToTest datetime default NULL,
SI>     ->   RelToRegr datetime default NULL,
SI>     ->   RelToNPI datetime default NULL,
SI>     ->   RelToCCO datetime default NULL,
SI>     ->   SanityResult enum('None','Green','Red') NOT NULL default 'None',
SI>     ->   PRIMARY KEY  (ID),
SI>     ->   UNIQUE KEY Load (IL,Item_ID)
SI>     -> ) TYPE=MyISAM COMMENT='SCM Internal Loads table';
SI> ERROR 1064: You have an error in your SQL syntax near 'Load (IL,Item_ID)
SI> ) TYPE=MyISAM COMMENT='SCM Internal Loads table'' at line 12

[skip]

SI> Is really urgent for us to solve this problem, because our DB is growing fast and 
we would like to have a consistent Backup.
SI> If I'm doing something wrong, please tell me.

LOAD is a reserved word:
     http://www.mysql.com/doc/R/e/Reserved_words.html

It's not recommended to use reserved words in table/column/key etc
names...
You can fix you problem just quoting LOAD with a ``' characters. Use
-Q or --quote-names option of mysqldump.

SI> Best Regards,
SI> Stefano




-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to