There are so many problems with foreign key constraints that we don't know where to start:
UPDATEstatements, and in this case almost all
FOREIGN KEYconstraint checks are useless because you usually insert records in the right tables in the right order, anyway.
FOREIGN KEY ... ON DELETErules when one codes an application. It's not unusual that one loses a lot of important information just because a wrong or misused
The only nice aspect of
FOREIGN KEY is that it gives ODBC and some other client programs the ability to see how a table is connected and to use this to show connection diagrams and to help in building applicatons.
MySQL will soon store
FOREIGN KEY definitions so that a client can ask for and receive an answer about how the original connection was made. The current `.frm' file format does not have any place for it. At a later stage we will implement the foreign key constraints for application that can't easily be coded to avoid them.