Re: PLS HELP: ERROR 1452 (23000) Foreign Key Constraint
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!