mirror of
https://github.com/MariaDB/server.git
synced 2025-05-07 04:01:59 +03:00
Keep track of how many pending XIDs (transactions that are prepared in storage engine and written into binlog, but not yet durably committed on disk in the engine) there are in each binlog. When the count of one binlog drops to zero, write a new binlog checkpoint event, telling which is the oldest binlog with pending XIDs. When doing XA recovery after a crash, check the last binlog checkpoint event, and scan all binlog files from that point onwards for XIDs that must be committed if found in prepared state inside engine. Remove the code in binlog rotation that waits for all prepared XIDs to be committed before writing a new binlog file (this is no longer necessary when recovery can scan multiple binlog files).
29 lines
1.0 KiB
PHP
29 lines
1.0 KiB
PHP
##############################################################################
|
|
#
|
|
# binlog_start_pos is the postion of the the first event in the binary log
|
|
# which follows the Format description event. Intended to reduce test suite
|
|
# dependance on the Format description event length changes (e.g. in case
|
|
# of adding new events). Evaluated as:
|
|
#
|
|
# binlog_start_pos = 4 /* binlog header */ +
|
|
# (Format_description_log_event length)
|
|
#
|
|
# Format_description_log_event length =
|
|
# 19 /* event common header */ +
|
|
# 57 /* misc stuff in the Format description header */ +
|
|
# number of events +
|
|
# 1 /* Checksum algorithm */ +
|
|
# 4 /* CRC32 length */
|
|
#
|
|
# With current number of events = 161,
|
|
#
|
|
# binlog_start_pos = 4 + 19 + 57 + 161 + 1 + 4 = 246.
|
|
#
|
|
##############################################################################
|
|
|
|
let $binlog_start_pos=246;
|
|
--disable_query_log
|
|
SET @binlog_start_pos=246;
|
|
--enable_query_log
|
|
|