Thursday, November 18, 2010

What information do you want in the binlog?

The MySQL task WL#4033 Informational Events includes adding information about the original query for row-based replication. This will make it easier to debug failures and user mistakes. It also makes it easier for us to add other information to the binary log. Is there some information missing that you think we should add to the binary log? Please feel free to comment on this blog entry or send me an email at firstname.lastname@oracle.com.

8 comments:

Rob said...

Username and source IP.

Robert Hodges said...

Column names and primary key columns in TABLE_MAP_EVENT structures would be enormously helpful. Currently it seems there are only column numbers and types, which makes heterogeneous replication quite difficult as you cannot reconstruct the full logical structure.

Mark Callaghan said...

Another vote for username and source IP.

I agree with Robert that the names are also needed especially when trying to integrate MySQL into the modern datacenter that runs other databases (SQL or NoSQL) along with MySQL and wants to keep them in sync.

Justin Swanhart said...

Monotonically increasing transaction identifier, and what Rob, Robert and Mark said.

Frazer Clement said...

I'd like the ability to add extra ignorable information to row events themselves (as opposed to a discrete event).

I'd use this to include event tags which could be retrieved when applying the Binlog on a Slave to get interesting and unusual behaviours.

Using a separate event for this would double the number of events/unit of binlog.

Isotopp said...

username and source IP and statement end time (statement start time is already logged)

Simon Mudd said...

Actually I think that USER() and CURRENT_USER() are more precise than user and source IP. Mysqld does not currently use the information of who made the change on the slave but this information could be useful in a number of circumstances.

Sheeri K. Cabral said...

user (includes username and host, whether it's IP or hostname).

current_user is interesting, and probably not hard to do, but is not hard to get from the user itself.