Carl,

----- Original Message -----
From: "Carl McNamee" <[EMAIL PROTECTED]>
Newsgroups: mailing.database.mysql
Sent: Tuesday, December 10, 2002 6:36 AM
Subject: RE: Question about SLAVE STOP


> I know that the slave will honor transactions but how does that effect the
> STOP SLAVE command?  Based on your note, I'm assuming (Oh, that nasty
word!)
> that if the stop slave is issued in the middle of a transaction it will
roll
> back.  I'm also assuming that the pointer for the bin-log will now point
to
> the begining of the transaction that was rolled back.  If this is
incorrect
> please let me know.

I think replication rolls back the current transaction at SLAVE STOP, and
resumes at SLAVE START from the MIDDLE of the transaction. Thus, this is a
bug in replication. It should not execute a half transaction.

The MySQL AB replication developer promised to fix this bug along with
another: it may be that issuing SLAVE STOP after SET INSERT_ID=..., but
before the corresponding INSERT also breaks replication, even if you are not
using transactions.

The fix he must implement: do not allow the slave to stop if there is a
BEGIN open, or a pending SET INSERT_ID=..., or a similar statement.

The bug still remains in the case where the slave crashes. InnoDB should
communicate after recovery to the slave thread up to which master binlog
position it was able to recover. The slave thread should restart replication
for InnoDB tables from that position, which often is not the same as the
position the slave thread now reads from the master.info file. The DBA can
set the correct position manually, because InnoDB prints that master binlog
position after it recovers. But there no automatic way yet to pass it to the
slave thread. The replication developer of MySQL AB has to study what is
involved in this. Maybe the slave has to delete the relay log file and do a
fresh start.

> Thanks!
>
> Carl

Thank you for noticing this bug!

Heikki
Innobase Oy

sql query




---------------------------------------------------------------------
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