I searched the archives and the manual for an answer to this, but I
haven't found an answer. I have several InnoDB tables:
CREATE TABLE test_parent
(
id INTEGER NOT NULL PRIMARY KEY
) TYPE = INNODB;
CREATE TABLE test_child
(
id INTEGER NOT NULL PRIMARY KEY,
parent_id INTEGER NOT NULL,
INDEX (parent_id),
FOREIGN KEY (parent_id) REFERENCES test_parent (id) ON DELETE CASCADE
) TYPE = INNODB;
INSERT INTO test_parent VALUES (1);
INSERT INTO test_child VALUES (50, 1);
I'm trying to change the ID of one of the rows in one table and one of
the rows which refer to it in another table:
BEGIN;
UPDATE test_parent SET id = 6;
UPDATE test_child SET parent_id = 6;
COMMIT;
But with statement-scoped referential integrity checking in place, I
obviously can't do that (it fails on the first UPDATE statement). Is
there a way to temporarily postpone integrity checking until the end of
the transaction? If not temporarily, then is there a way to define one
of the tables to postpone integrity checking until the end of the XA?
(By the way, I'm using 4.0.13.) Thanks in advance for any assistance!
--Matt
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]