Bug #3332 Error on foreign key creation.
| Submitted: | 30 Mar 2004 4:19 | Modified: | 30 Mar 2004 6:28 |
|---|---|---|---|
| Reporter: | SINISA MILIVOJEVIC | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: InnoDB storage engine | Severity: | S2 (Serious) |
| Version: | 4.0.18 | OS: | Any (any) |
| Assigned to: | Marko Mäkelä | CPU Architecture: | Any |
[30 Mar 2004 4:19]
SINISA MILIVOJEVIC
[30 Mar 2004 5:22]
Heikki Tuuri
Hi! ------------------------ LATEST FOREIGN KEY ERROR ------------------------ 040330 16:05:21 Error in foreign key constraint creation for table test/#sql-e38 _1. A foreign key constraint of name test/FOREIGN already exists (note that internally InnoDB adds 'databasename/' in front of the user-defined constraint name). InnoDB seems to take the word 'FOREIGN' as the constraint id. Workaround: do not specify put the word CONSTRAINT to the clauses if you do not explicitly specify the constraint name. Marko will fix this bug to 4.0.19. Thank you, Heikki
[30 Mar 2004 6:28]
Marko Mäkelä
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.
If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information
about accessing the source trees is available at
http://www.mysql.com/doc/en/Installing_source_tree.html
Additional info:
The foreign key constraint parser in InnoDB expected an identifier after the keyword CONSTRAINT, like this: CONSTRAINT constraint_id FOREIGN KEY .... I have now fixed it (ChangeSet 1.1754), so that CONSTRAINT FOREIGN KEY ... works.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.050 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
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.