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