Bug #1045 | "Foreign key" clause doesn't report its name | ||
---|---|---|---|
Submitted: | 13 Aug 2003 17:35 | Modified: | 20 Oct 2003 4:46 |
Reporter: | Matthias Urlichs | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S2 (Serious) |
Version: | 4.1.0 +BK | OS: | Linux (Linux 2.4.21) |
Assigned to: | CPU Architecture: | Any |
[13 Aug 2003 17:35]
Matthias Urlichs
[14 Aug 2003 2:53]
Alexander Keremidarski
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.mysql.com/documentation/ and the instructions on how to report a bug at http://bugs.mysql.com/how-to-report.php From InnoDB manual: "Starting from version 4.0.13, InnoDB supports ALTER TABLE yourtablename DROP FOREIGN KEY internally_generated_foreign_key_id You have to use SHOW CREATE TABLE to find the internally generated foreign key id when you want to drop a foreign key." Internal foreign key id is included in SHOW CREATE TABLE output
[19 Oct 2003 16:32]
Marcus Bointon
I've observed this same problem on MySQL 3.23.55. It's not a documentation problem - SHOW CREATE TABLE just doesn't list IDs. What is more, it allows multiple identical foreign keys to be created, which doesn't make any sense. There doesn't seem to be any way of deleting foreign keys at all - even "ALTER TABLE tablename DROP FOREIGN KEY" doesn't work (even though it thinks about it for a while!)! Can you post the output from a version of MySQL that this does work properly in, using the above example? If this is fixed in later versions, then this bug should be marked as "closed", not "not a bug".
[20 Oct 2003 4:46]
Heikki Tuuri
Mathias, the feature is only available in versions >= 4.0.13 and >= 4.1.1. 4.1.0 was released before 4.0.13. Regards, Heikki