Daniel,

----- Original Message ----- 
From: <[EMAIL PROTECTED]>
Newsgroups: mailing.database.myodbc
Sent: Monday, January 26, 2004 5:53 AM
Subject: key constraint error on replace


> Hi there, i am trying to use a replace, when mysql throws an error
> of "Cannot delete or update a parent row: a foreign key constraint fails"
,
> is there any way to get more information like which key is having the
> issue, is there more detailed information i can extract ?

this is a known problem, which should be documented: sometimes MySQL
internally performs REPLACE as an INSERT, sometimes as a DELETE + INSERT,
and sometimes as an UPDATE. The behavior with foreign key constraints is not
very well predictable.

You can get a detailed description of the latest FOREIGN KEY error with

SHOW INNODB STATUS\G

Best regards,

Heikki Tuuri
Innobase Oy
http://www.innodb.com
Foreign keys, transactions, and row level locking for MySQL
InnoDB Hot Backup - a hot backup tool for InnoDB which also backs up MyISAM
tables


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

Reply via email to