By that I hope you mean there is an index on confinvitems.InvDetID _and_
confinvdet.ID

Yes, there is.

Could be a record in confinvitems that has an InvDetID that doesn't
exist in ConfInvDet. Check with something like:
SELECT InvDetID FROM confinvitems WHERE InvDetID NOT IN (SELECT ID FROM ConfInvDet);

That was probably it. I did a massive purge of the data yesterday, then I tried to add the Foreign Keys again, and it worked just fine.

Also if you do a SHOW INNODB STATUS after your failed query you can get
more details on the last error. The InnoDB fkey errors reported back
tends to be a bit vague, covering all sorts of failures.

Aaah. I had forgotten about that. I was able to find and solve a problem with that one time before. I'll make a special note of that and hopefully remember to do that next time.

Thanks,
Jesse

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to