MySQL Forums
Forum List  »  InnoDB

Binlog event ordering guarantee.
Posted by: Harry Simons
Date: April 10, 2017 01:52AM

Hello,

I'm using MySQL 5.6.13-log with the following flags:

binlog_format = MIXED
tx_isolation = READ-COMMITTED
binlog_rows_query_log_events = ON

Also, with the help of the 'mysql-binlog-connector-java' tool, I'm trying to listen to the various binlog events in order to extract:

1. the INSERT/UPDATE/DELETE SQL statements; and
2. the database name the SQL was executed on.

Upon issuing an "INSERT INTO foo values(...)", I'm seeing the ROWS_QUERY_EVENT and TABLE_MAP_EVENT events being generated.

But the ROWS_QUERY_EVENT does not have the database name in it (it's there in TABLE_MAP_EVENT).

If MySQL can guarantee the generation of these two events in the above order for versions 5.6.x, then I may be able to correlate the two, and put the SQL query and the database name together.

I asked the author of mysql-binlog-connector-java this question on event ordering, and he said he's not sure of it. So, can someone from the MySQL team confirm or deny the event ordering?

Alternatively, can the database name and the SQL be obtained any other way (without changing binlog_format=MIXED and tx_isolation=READ-COMMITTED)?

Regards,
/HS

Options: ReplyQuote


Subject
Views
Written By
Posted
Binlog event ordering guarantee.
278
April 10, 2017 01:52AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.