Bug #30924 please record more metadata in binlog
Submitted: 10 Sep 2007 6:27 Modified: 10 Sep 2007 6:30
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Replication Severity:S4 (Feature request)
Version: OS:Any
Assigned to: Assigned Account CPU Architecture:Any

[10 Sep 2007 6:27] Shane Bester
Description:
currently binlog contains information like this:

# at 17524
#070909 20:02:27 server id 5  end_log_pos 17616  Query   thread_id=4     exec_time=0     error_code=0
SET TIMESTAMP=1189360947/*!*/;
delete from t1 where id=31334/*!*/;

would be nice to have some more information:

1) affected_rows by this statement
2) the user@host who executed this statement

1 would allow replication to detect inconsistencies earlier, by comparing the value to the slave.
2 would enable binlogs to be filtered/processed on a per user level.

How to repeat:
.

Suggested fix:
.
[10 Sep 2007 6:30] Valeriy Kravchuk
Thank you for a reasonable feature request.
[27 Mar 2010 5:56] MySQL Verification Team
see related bug #28377
[10 May 2010 12:42] Mats Kindahl
WL#4033 add informational events to the binary log. These are used to write information that can be used by slaves if they are interested, and ignored otherwise. In particular, this is used to pass comments in the binary log.

Currently, there is no support for providing the information requested, but with this class of events, it can now be added.
[17 Jul 2010 13:52] Mark Callaghan
This would be great to have for auditing.