replication failure while importing data.

replication failure while importing data.

am 31.03.2003 16:44:02 von Sinisa Milivojevic

Hi!

This is just to confirm that what you are reporting is truly a bug.

It is caused by a fact that some SET statements are not replicated
yet.

Thus SET FOREIGN_KEY_CHECKS=0 is not replicated either.

A workaround for you is to import tables in an order which respects foreign
keys!

The above bug should be fixed in 4.0.13.

--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer
/_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
<___/ www.mysql.com



--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org

Re: replication failure while importing data.

am 01.04.2003 15:54:42 von Guilhem Bichot

On Monday 31 March 2003 16:44, Sinisa Milivojevic wrote:
> Hi!
>
> This is just to confirm that what you are reporting is truly a bug.
>
> It is caused by a fact that some SET statements are not replicated
> yet.
>
> Thus SET FOREIGN_KEY_CHECKS=0 is not replicated either.
>
> A workaround for you is to import tables in an order which respects foreign
> keys!
>
> The above bug should be fixed in 4.0.13.

Hi,

This bug will not be fixed in 4.0.13, it will be in 5.0.
It is a subset of a larger bug : global and session variables
are not replicated yet. Examples that cause problems are
FOREIGN_KEY_CHECKS and SQL_MODE
(Bug #88 Some SET commands should be written to the binlog
as they affect next updates).
It is not obvious to fix this because one can have multiple
threads, one using FOREIGN_KEY_CHECKS=0 and the others using
FOREIGN_KEY_CHECKS=1, and then we must be careful in the binlog,
that a SET command does not have side effects.
Replicating user variables was a similar task, it is done in 4.1.

Until 5.0, another workaround (there are cases where no table order
respects foreign keys, if table A references B which references A) is :

- on the master do
SET SQL_LOG_BIN=0;
SET FOREIGN_KEY_CHECKS=0;
....commands...
SET FOREIGN_KEY_CHECKS=1;
SET SQL_LOG_BIN=1;

- and on the slave do (manually)
SET FOREIGN_KEY_CHECKS=0;
....commands...
SET FOREIGN_KEY_CHECKS=1;

Regards,
Guilhem

--
MySQL 2003 Users Conference -> http://www.mysql.com/events/uc2003/
For technical support contracts, visit https://order.mysql.com/?ref=mgbi
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Guilhem Bichot
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Software Developer
/_/ /_/\_, /___/\___\_\___/ Bordeaux, France
<___/ www.mysql.com

--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org