MySQL Forums
Forum List  »  Newbie

#1280 - Incorrect index name
Posted by: Karsten Wutzke
Date: January 05, 2012 09:18AM

Hello,

I've recently reinstalled my system and I upgraded from an older 5.1.x MySQL to 5.5.x.

Now I'm using DDL scripts that I've always used and I get a MySQL error on

CREATE  TABLE IF NOT EXISTS `GeoAreas`
(
  `id` INT(11)  NOT NULL AUTO_INCREMENT ,
  `parent_id` INT(11)  NULL ,
  `name` VARCHAR(50) NOT NULL ,
  PRIMARY KEY (`id`) ,
  CONSTRAINT `geoareas_self_fk` FOREIGN KEY (`parent_id` ) REFERENCES GeoAreas` (`id` ) ON DELETE NO ACTION ON UPDATE CASCADE
);

CREATE INDEX `geoareas_self_fk` ON `GeoAreas` (`parent_id` ASC) ;

Message:

Error

SQL query:

CREATE INDEX `geoareas_self_fk` ON `GeoAreas` (
`parent_id` ASC
);

MySQL said:
#1280 - Incorrect index name 'geoareas_self_fk'

Does MySQL no longer allow the same names for FKs and indices?????

Karsten

Options: ReplyQuote


Subject
Written By
Posted
#1280 - Incorrect index name
January 05, 2012 09:18AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.