Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
5.5.45, 10.1.7-1
Description
Hi guys, we should check if this should be merged or not from mysql
http://bugs.mysql.com/bug.php?id=73757
probably a document bug, or maybe not, just check to don't leave dba searching were is the erro, include a "create table report errors at show warnings about foreign keys" or something like this
Attachments
Issue Links
- is blocked by
-
MDEV-6113 merge 5.7 innodb
-
- Closed
-
- links to
Fix on 5.7 seems to me unsatisfactory :
mysql> create table t2(a int, constraint a foreign key a (a) references t1(a))engine=innodb;
ERROR 1215 (HY000): Cannot add foreign key constraint
mysql> show warnings\G
*************************** 1. row ***************************
Level: Warning
Code: 150
Message: Create table 'test/t2' with foreign key constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns.
This is unclear when there is more than one foreign key on table test/t2.