List:Replication« Previous MessageNext Message »
From:MARK CALLAGHAN Date:December 7 2010 2:38pm
Subject:Re: Is there a way to associate BINLOG position with specific COMMIT command
View as plain text  
On Mon, Dec 6, 2010 at 11:23 PM, Mats Kindahl <mats.kindahl@stripped> wrote:
> Hi Niv,
>
> If I understand your question right, you would like to do something like
> this:
>
>    BEGIN;
>    .
>    .
>    .
>    COMMIT;
>    SELECT LAST_BINLOG_POS();
>
> Unfortunately, there is no good and safe way to see where a transaction
> or a statement were written in the binary log in a thread. The best
> approach is to use SHOW MASTER STATUS to get a file and position, but
> this command assumes that you do not write anything between the last
> commit and the command. If you want to ensure that no other thread
> writes anything between the commit and when you fetch the position, you
> have to lock some table that you use to serialize all transactions.

Mats - I assume you mean no good way without modifying the server and
that I could add the SQL command COMMIT_AND_RETURN_BINLOG_POS.

-- 
Mark Callaghan
mdcallag@stripped
Thread
Is there a way to associate BINLOG position with specific COMMIT commandNiv Dalal1 Dec
  • Re: Is there a way to associate BINLOG position with specific COMMIT commandWagner Bianchi1 Dec
    • Re: Is there a way to associate BINLOG position with specific COMMIT commandJohan De Meersman1 Dec
      • Re: Is there a way to associate BINLOG position with specific COMMIT commandNiv Dalal1 Dec
        • Re: Is there a way to associate BINLOG position with specific COMMIT commandWagner Bianchi1 Dec
          • Re: Is there a way to associate BINLOG position with specific COMMIT commandNiv Dalal1 Dec
            • Re: Is there a way to associate BINLOG position with specific COMMIT commandFrank1 Dec
              • Re: Is there a way to associate BINLOG position with specific COMMIT commandJohan De Meersman1 Dec
                • Re: Is there a way to associate BINLOG position with specific COMMIT commandNiv Dalal1 Dec
                • Re: Is there a way to associate BINLOG position with specific COMMIT commandNiv Dalal1 Dec
                  • Re: Is there a way to associate BINLOG position with specific COMMIT commandWagner Bianchi1 Dec
                    • Re: Is there a way to associate BINLOG position with specific COMMIT commandWagner Bianchi1 Dec
                      • Re: Is there a way to associate BINLOG position with specific COMMIT commandNiv Dalal1 Dec
                        • Re: Is there a way to associate BINLOG position with specific COMMIT commandDatabase System4 Dec
                          • Re: Is there a way to associate BINLOG position with specific COMMIT commandNiv Dalal4 Dec
                            • Re: Is there a way to associate BINLOG position with specific COMMIT commandDatabase System5 Dec
                              • Re: Is there a way to associate BINLOG position with specific COMMIT commandNiv Dalal5 Dec
                                • Re: Is there a way to associate BINLOG position with specific COMMITcommandMats Kindahl7 Dec
                                  • Re: Is there a way to associate BINLOG position with specific COMMIT commandMARK CALLAGHAN7 Dec
                                    • Re: Is there a way to associate BINLOG position with specific COMMITcommandMats Kindahl7 Dec