MySQL Forums
Forum List  »  Newbie

Re: PLS HELP: ERROR 1452 (23000) Foreign Key Constraint
Posted by: Roland Chan
Date: April 06, 2011 01:34PM

Some additional discovered info: I noticed this in the show engine innodb output. What is confusing is that the Insured table does exist:

------------------------
LATEST FOREIGN KEY ERROR
------------------------
110406 15:10:30 Transaction:
TRANSACTION 5A7, ACTIVE 0 sec, OS thread id 4503158784 inserting
mysql tables in use 1, locked 1
1 lock struct(s), heap size 376, 0 row lock(s), undo log entries 1
MySQL thread id 6, query id 104 localhost root update
insert into Beneficiary (beneficiary_id, insured_id) values (1,1)
Foreign key constraint fails for table `constraint_test`.`beneficiary`:
,
CONSTRAINT `FK41BADEC55CE3480` FOREIGN KEY (`insured_id`) REFERENCES `Insured` (`insured_id`)
Trying to add to index `FK41BADEC55CE3480` tuple:
DATA TUPLE: 2 fields;
0: len 8; hex 8000000000000001; asc ;;
1: len 8; hex 8000000000000001; asc ;;

But the parent table `constraint_test`.`Insured`
or its .ibd file does not currently exist!

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.