Dear All,

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

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.
This is the Table structure which cause the error :

DROP TABLE IF EXISTS InternalLoads;
CREATE TABLE InternalLoads (
  ID int(10) unsigned NOT NULL auto_increment,
  IL varchar(12) NOT NULL default '',
  Item_ID int(10) unsigned NOT NULL default '0',
  BLDate datetime NOT NULL default '0000-00-00 00:00:00',
  RelToTest datetime default NULL,
  RelToRegr datetime default NULL,
  RelToNPI datetime default NULL,
  RelToCCO datetime default NULL,
  SanityResult enum('None','Green','Red') NOT NULL default 'None',
  PRIMARY KEY  (ID),
  UNIQUE KEY Load (IL,Item_ID)
) TYPE=MyISAM COMMENT='SCM Internal Loads table';


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


To make it work correctly it is enough to remove the name 'Load' assigned in the 
'UNIQUE KEY' row :
UNIQUE KEY Load (IL,Item_ID)    ->      UNIQUE KEY (IL,Item_ID)

I think this could be a bug, because as a matter of fact I wouldn't be able to rebuild 
our DB in case of crash without editing the SQL Backup file generated by mysqldump, 
which is really dangerous.

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

Best Regards,
Stefano

 
----------------------------------------
Stefano Incontri
OWT WebMaster
Cisco Photonics Italy S.r.l.
Via Philips, 12
20052 Monza (MI)
e-mail: [EMAIL PROTECTED]
Tel.  +39 039 209 1266
Cell. +39 0335 7454458
Fax.  +39 039 209 1099

---------------------------------------------------------------------
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