Replication and Binary Logging Options and Variables If a write to the binary log causes the current log file size to exceed the value of this variable, the server rotates the binary logs (closes the current file and opens the next one). The minimum value is 4096 bytes. The maximum and default value is 1GB. Encrypted binary log files have an additional 512-byte header, which is included in  max_binlog_size . A transaction is written in one chunk to the binary log, so it is never split between several binary logs. Therefore, if you have big transactions, you might see binary log files larger than  max_binlog_size . If  max_relay_log_size  is 0, the value of  max_binlog_size  applies to relay logs as well. With GTIDs in use on the server, when  max_binlog_size  is reached, if the system table mysql.gtid_executed  cannot be accessed to write the GTIDs from the current binary log file, the binary log cannot be rotated. In this situation, the server responds according to its binlog_error_action  setting. If  IGNORE_ERROR  is set, an error is logged on the server and binary logging is halted, or if  ABORT_SERVER  is set, the server shuts down. If nontransactional statements within a transaction require more than this many bytes of memory, the server generates an error. The minimum value is 4096. The maximum and default values are 4GB on 32-bit platforms and 16EB (exabytes) on 64-bit platforms. The value must be a multiple of 4096. max_binlog_stmt_cache_size  sets the size for the statement cache only; the upper limit for the transaction cache is governed exclusively by the  max_binlog_cache_size  system variable. 3567 • original_commit_timestamp • max_binlog_stmt_cache_size Block Size 4096 Command-Line Format --max-binlog-stmt-cache-size=# System Variable max_binlog_stmt_cache_size Scope Global Dynamic Yes SET_VAR  Hint Applies No Type Integer Default Value 18446744073709547520 Minimum Value 4096 Maximum Value 18446744073709547520 Block Size 4096 System Variable original_commit_timestamp Scope Session Dynamic Yes SET_VAR  Hint Applies No