Quantcast
Channel: MySQL Forums - InnoDB
Viewing all articles
Browse latest Browse all 1954

Foreign key error (no replies)

$
0
0
I ran
SHOW ENGINE INNODB STATUS
and got the following output:

LATEST FOREIGN KEY ERROR
------------------------
100921 3:32:12 Transaction:
TRANSACTION 2 2203551035, ACTIVE 0 sec, process no 19308, OS thread id 140671158704464 inserting, thread declared inside InnoDB 500
mysql tables in use 1, locked 1
3 lock struct(s), heap size 368, 2 row lock(s)
MySQL thread id 3617455, query id 9589921494 isk-sc-vim101.int.iskoot.com 10.10.40.81 root update
INSERT INTO service_account_details (service_account, call_forward, status, pstn_currency, full_name, credentials2, credentials3, more_info, msn_device_id, pstn_balance)
VALUES ('2713760', NULL, '1', NULL, NULL, NULL, NULL, NULL, NULL, NULL)
Foreign key constraint fails for table `Notifier`.`service_account_details`:
,
CONSTRAINT `fk_sa_sad` FOREIGN KEY (`service_account`) REFERENCES `service_accounts` (`service_account_id`) ON DELETE CASCADE ON UPDATE CASCADE
Trying to add in child table, in index `PRIMARY` tuple:
DATA TUPLE: 16 fields;
0: len 8; hex 80000000002968a0; asc )h ;; 1: len 6; hex 00028357853b; asc W ;;; 2: len 7; hex 800000002d0084; asc - ;; 3: len 2; hex 8001; asc ;; 4: SQL NULL; 5: SQL NULL; 6: SQL NULL; 7: SQL NULL; 8: SQL NULL; 9: SQL NULL; 10: SQL NULL; 11: SQL NULL; 12: SQL NULL; 13: SQL NULL; 14: SQL NULL; 15: len 7; hex 80000000000000; asc ;;

But in parent table `Notifier`.`service_accounts`, in index `PRIMARY`,
the closest match we can find is record:
PHYSICAL RECORD: n_fields 7; compact format; info bits 32
0: len 8; hex 80000000002968a0; asc )h ;; 1: len 6; hex 0002835784e9; asc W ;; 2: len 7; hex 0000000dce0cd2; asc ;; 3: len 25; hex 72616a616868696c6c696172643934407961686f6f2e636f6d; asc removed@yahoo.com;; 4: len 2; hex 6662; asc fb;; 5: SQL NULL; 6: len 30; hex 35313043424346382d393037362d313144462d424641322d313739423831; asc 510CBCF8-9076-11DF-BFA2-179B81;...(truncated);

I have a few questions:

1. What does asc )h mean?

2. What does asc W mean?

3. The error is that it cannot insert a child row whose key is 2713760.
It then states that "closest match we can find is record:
PHYSICAL RECORD: n_fields 7; compact format; info bits 32
0: len 8; hex 80000000002968a0; asc )h ;;

But HEX 2968a0 is exactly 2713760 ??
Therefore the child record DOES have parent row in the parent table!
So it does find the parent!

So why can't i insert the child row?

this is innodb on server 5.1.35 on SLES 11

thanks
adam

Viewing all articles
Browse latest Browse all 1954

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>