WL#1438: Improving 'foreign keys' functionality for InnoDB

Affects: Server-7.1   —   Status: Un-Assigned

1. Provide using of user defined names of constrains in InnoDB foreign key 
 
2. Provide using of class foreign_key in InnoDB to avoid double parsing of 
query 
 
To clarify a bit what point "1." is about, this is an email conversation 
between peterg and vva on 2003-01-13: 
 
PG> Does this mean that you think we should allow 
PG> ALTER TABLE Table1 DROP CONSTRAINT constraint_name; 
PG> ? 
 
VVA> Not exactly.. I don't want to change mysql syntax in this WL.. 
VVA> Look at this: 
 
mysql> create table t2(i int, index(i), foreign key 
key_which_I_want_to_give_name_to(i) references t2(i))engine=innodb; 
Query OK, 0 rows affected (0.02 sec) 
 
mysql> show create table t2; 
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 
| Table | Create Table                                                                                                                                                        
| 
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 
| t2    | CREATE TABLE `t2` ( 
  `i` int(11) default NULL, 
  KEY `i` (`i`), 
  CONSTRAINT `0_17` FOREIGN KEY (`i`) REFERENCES `t2` (`i`) 
) ENGINE=InnoDB DEFAULT CHARSET=latin1 | 
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 
1 row in set (0.01 sec) 
 
VVA> InnoDB ignore name that I give for key (key_which_I_want_to_give_name_to) 
VVA> It give name '0_17' for it.. 
VVA> I only want to force InnoDB to use mysql syntax possibilities completely.