Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Not a Bug
-
5.5.33a
-
None
-
None
Description
I discovered a situation where a two-column foreign key constraint doesn't seem to require an index on the referenced columns in the referenced table. I am attaching a repro case that illustrates the scenario, but it is rather complex.
Basically, there are three tables:
- Table "A" has one column "a" which is a primary key
- Table "B" has two columns, "a" which is a foreign key to table "A", and "b" which is a primary key
- Table "C" has two columns, "a" and "b", which together are a foreign key to the columns in table "B"
Based on whether table B's foreign key to A is declared inline or separately, table C cannot/can be created.