Michael,

a good point. SET FOREIGN_KEY_CHECKS is currently not replicated properly.

I have to fix this by wrapping the SQL statement in the binlog inside

SET FOREIGN_KEY_CHECKS=0;
<statement here>
SET FOREIGN_KEY_CHECKS=1;

if thd->options & OPTION_NO_FOREIGN_KEY_CHECKS is true for the connection.

I hope the fix makes it to 4.0.10 or 4.0.11.

Thank you,

Heikki
Innobase Oy


................
Subject: Issues with InnoDB & Replication
From: Michael Merwitz
Date: 22 Jan 2003 09:16:42 -0500


----------------------------------------------------------------------------
----

Perhaps I have mis-read the documentation, or I have not set my
configuration options correctly: Any assistance much appreciated!

I have two db servers, one set as a Master and one set as a Slave. Both
are identically configured (RH7.3, MySQL-Max 3.23.54) to use InnoDB.
However, there are occasions where I need to bulk load data to the
Master, which I do using a SQL script, the first command of which is
"SET FOREIGN_KEY_CHECKS = 0".  You can see what's coming... When I load
the data to Master, it works perfectly, but the replication chokes
because of foreign key constraint violations.

I have two work-arounds to this: (a) Make sure my bulk load data is set
up in the correct order so as to remove any FK errors (too tedious!), or
(b), create Slave with no FK constraints -- which will be an issue when
I add new tables to Master with FK's, as these will replicate.

So what do I do? Is there some configuration setting I can tweak to make
the 'SET-FK_CHECK' parameter to replicate as well? Or is this a
"feature"?

Michael.






---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to