summaryrefslogtreecommitdiffstats
path: root/sql/wsrep_trans_observer.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sql/wsrep_trans_observer.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/wsrep_trans_observer.h b/sql/wsrep_trans_observer.h
index a963a2b1..25e71638 100644
--- a/sql/wsrep_trans_observer.h
+++ b/sql/wsrep_trans_observer.h
@@ -91,7 +91,13 @@ static inline bool wsrep_is_real(THD* thd, bool all)
*/
static inline bool wsrep_has_changes(THD* thd)
{
- return (thd->wsrep_trx().is_empty() == false);
+ // Transaction has changes to replicate if it
+ // has appended one or more certification keys,
+ // and has actual changes to replicate in binlog
+ // cache. Except for streaming replication,
+ // where commit message may have no payload.
+ return !thd->wsrep_trx().is_empty() &&
+ (!wsrep_is_binlog_cache_empty(thd) || thd->wsrep_trx().is_streaming());
}
/*