19.1.6.4 Binary Logging Options and Variables (original) (raw)

The following list describes system variables for controlling binary logging. They can be set at server startup and some of them can be changed at runtime usingSET. Server options used to control binary logging are listed earlier in this section.

In WRITESET orWRITESET_SESSION mode, the source usesCOMMIT_ORDER to generate dependency information for transactions that have empty or partial write sets, transactions that update tables without primary or unique keys, and transactions that update parent tables in a foreign key relationship.
To setbinlog_transaction_dependency_tracking toWRITESET orWRITESET_SESSION,transaction_write_set_extraction must be set to a value other than OFF; the default value (XXHASH64) is sufficient for this.transaction_write_set_extraction cannot be changed whenever the value ofbinlog_transaction_dependency_tracking isWRITESET orWRITESET_SESSION. Any change in the value does not take effect for replicated transactions until after the replica has been stopped and restarted withSTOP REPLICA andSTART REPLICA.
The number of row hashes to be kept and checked for the latest transaction to have changed a given row is determined by the value ofbinlog_transaction_dependency_history_size.
Group Replication carries out its own parallelization after certification when applying transactions from the relay log, independently of any value set forbinlog_transaction_dependency_tracking, but this variable does affect how transactions are written to the binary logs on Group Replication members. The dependency information in those logs is used to assist the process of state transfer from a donor's binary log for distributed recovery, which takes place whenever a member joins or rejoins the group. For that process, settingbinlog_transaction_dependency_tracking toWRITESET can improve performance for a group member, depending on the group's workload.

A -> B -> C  

Here, A serves as the source for the replica B, and B serves as the source for the replica C. For this to work, B must be both a source_and_ a replica. With binary logging enabled andlog_replica_updates enabled, which are the default settings, updates received from A are logged by B to its binary log, and can therefore be passed on toC.

A -> B -> C  

Here, A serves as the source for the replica B, and B serves as the source for the replica C. For this to work, B must be both a source_and_ a replica. With binary logging enabled andlog_slave_updates enabled, which are the default settings, updates received fromA are logged by B to its binary log, and can therefore be passed on toC.

max_binlog_cache_size <  
  (((maxsize - max_binlog_size) / max_connections) - 1000) / 1.2  

This calculation takes into account the following conditions: