Re: Replication Drama

2001-07-16 Thread Jeremy Zawodny

On Sun, Jul 15, 2001 at 10:24:17PM +0200, Warren van der Merwe wrote:
 Hi there
 
 I have a triangular replication setup, works like a dream

That's a good word for a 3-way replication setup, thanks.  I keep
describing it as a ring, but it really does look more like a triangle.

 In my haste I went and created a table in Site A's database, and
 then dialled into Site B and created the table. As yet I haven't
 done a slave start to start the replication process because I caught
 onto my vital mistake. i.e. The replication will now complain that
 Site B already contains a table called some_tablename. So, my
 question is, what do I do about this?  Is there a way of getting it
 to skip the create or can I delete one of them but if I delete
 it, Site C will complain that the table does not exist, Site A won't
 update because the table exists and the Add table was the first
 command, etc etc etc, turns into a vicious loop.

Uh oh.

 Is there a way I can recover from this?

I think this should work...

Drop the table on B.  It will be created when the slave reads the
CREATE TABLE off of A, its master.  Start the slave on B.

Start the slave on C.  It will create the table--probably twice.  The
second time it will fail and replication will fail on C.  Issue a

  SET SQL_SLAVE_SKIP_COUNTER = 1

command on C and restart replication.  That should skip over the
CREATE TABLE statement it got from A (by way of B) and all should be
happy.

If you try that, let me know if that does or doesn't work.  I think it
should work, but I'd really like to know if that's not the case.

Have fun,

Jeremy
-- 
Jeremy D. Zawodny, [EMAIL PROTECTED]
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878   Fax: (408) 349-5454   Cell: (408) 685-5936 -- NEW

MySQL 3.23.29: up 29 days, processed 225,292,179 queries (87/sec. avg)

-
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




Replication Drama

2001-07-15 Thread Warren van der Merwe

Hi there

I have a triangular replication setup, works like a dream

In my haste I went and created a table in Site A's database, and then
dialled into Site B and created the table. As yet I haven't done a slave
start to start the replication process because I caught onto my vital
mistake. i.e. The replication will now complain that Site B already contains
a table called some_tablename. So, my question is, what do I do about this?
Is there a way of getting it to skip the create or can I delete one of
them but if I delete it, Site C will complain that the table does not
exist, Site A won't update because the table exists and the Add table was
the first command, etc etc etc, turns into a vicious loop.

Is there a way I can recover from this?

Regards
Warren


~
Warren van der Merwe
Software Director
PRT Trading (Pty) Ltd t/a RedTie
Durban, South Africa
Cell (+27-83) 262-9163
Office (+27-31) 767-0249



-
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