Bug #15046 | constraint incorrectly enforced | ||
---|---|---|---|
Submitted: | 18 Nov 2005 10:01 | Modified: | 13 May 2010 16:04 |
Reporter: | Aleksandar Ivanisevic | Email Updates: | |
Status: | Open | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S4 (Feature request) |
Version: | 4.1.15 | OS: | Linux (linux) |
Assigned to: | Assigned Account | CPU Architecture: | Any |
[18 Nov 2005 10:01]
Aleksandar Ivanisevic
[18 Nov 2005 11:23]
Heikki Tuuri
Hi! SQL standards actually would require that the referenced columns carry a UNIQUE constraint. Then this situation will not arise, since only a single row in the referenced table can be the referenced one. http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt " 2) Case: a) If the <referenced table and columns> specifies a <reference column list>, then the set of column names of that <refer- ence column list> shall be equal to the set of column names in the unique columns of a unique constraint of the refer- enced table. Let referenced columns be the column or columns identified by that <reference column list> and let refer- enced column be one such column. Each referenced column shall identify a column of the referenced table and the same column shall not be identified more than once. b) If the <referenced table and columns> does not specify a <reference column list>, then the table descriptor of the referenced table shall include a unique constraint that spec- ifies PRIMARY KEY. Let referenced columns be the column or columns identified by the unique columns in that unique con- straint and let referenced column be one such column. The <referenced table and columns> shall be considered to implic- itly specify a <reference column list> that is identical to that <unique column list>. " I am changing this bug report to a 'Feature request'. Regards, Heikki