diff options
author | Teemu Ollakka <teemu.ollakka@galeracluster.com> | 2019-02-14 23:49:07 +0200 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2019-02-18 15:04:38 +0200 |
commit | f0b65102b23f006f596eef35e6e5f4f8b6d8146d (patch) | |
tree | d44cd77b1cd6d7ae60b47ee6cf034e203f58d993 /sql/wsrep_trans_observer.h | |
parent | 33fd3998d253aad13913cef00a5f0d3629e423ec (diff) | |
download | mariadb-git-f0b65102b23f006f596eef35e6e5f4f8b6d8146d.tar.gz |
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.
Diffstat (limited to 'sql/wsrep_trans_observer.h')
-rw-r--r-- | sql/wsrep_trans_observer.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/wsrep_trans_observer.h b/sql/wsrep_trans_observer.h index a3acc9e78fb..04a1224701e 100644 --- a/sql/wsrep_trans_observer.h +++ b/sql/wsrep_trans_observer.h @@ -83,6 +83,14 @@ static inline bool wsrep_streaming_enabled(THD* thd) return (thd->wsrep_sr().fragment_size() > 0); } +/* + Return number of fragments succesfully certified for the + current statement. + */ +static inline size_t wsrep_fragments_certified_for_stmt(THD* thd) +{ + return thd->wsrep_trx().fragments_certified_for_statement(); +} static inline int wsrep_start_transaction(THD* thd, wsrep_trx_id_t trx_id) { |