mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-18585 Avoid excessive Annotate_rows_log_events in binlog
Make sure that the Annotate_rows_log_events is written into binlog only for the first fragment of the current statement. Also avoid flusing pending rows event when calculating bytes generated by the transaction. Added and recorded a test which verifies that the binlog contains only one Annotate_rows_log_event per statement with various SR settings. Recrded mysql-wsrep-features#136 which produced different output with excession log events suppressed.
This commit is contained in:
committed by
Jan Lindström
parent
33fd3998d2
commit
f0b65102b2
@@ -6256,7 +6256,9 @@ static int write_locked_table_maps(THD *thd)
|
||||
MYSQL_LOCK *locks[2];
|
||||
locks[0]= thd->extra_lock;
|
||||
locks[1]= thd->lock;
|
||||
my_bool with_annotate= thd->variables.binlog_annotate_row_events &&
|
||||
my_bool with_annotate= IF_WSREP(!wsrep_fragments_certified_for_stmt(thd),
|
||||
true) &&
|
||||
thd->variables.binlog_annotate_row_events &&
|
||||
thd->query() && thd->query_length();
|
||||
|
||||
for (uint i= 0 ; i < sizeof(locks)/sizeof(*locks) ; ++i )
|
||||
|
Reference in New Issue
Block a user