@@ -128,11 +128,11 @@ type BinlogSyncerConfig struct {
128
128
129
129
EventCacheCount int
130
130
131
- // MariaDBDynamicLogPos enables dynamic LogPos calculation for MariaDB.
131
+ // FillZeroLogPos enables dynamic LogPos calculation for MariaDB.
132
132
// When enabled, automatically adds BINLOG_SEND_ANNOTATE_ROWS_EVENT flag
133
133
// to ensure correct position calculation in MariaDB 11.4+.
134
134
// Only works with MariaDB flavor.
135
- MariaDBDynamicLogPos bool
135
+ FillZeroLogPos bool
136
136
137
137
// SynchronousEventHandler is used for synchronous event handling.
138
138
// This should not be used together with StartBackupWithHandler.
@@ -516,8 +516,8 @@ func (b *BinlogSyncer) writeBinlogDumpCommand(p mysql.Position) error {
516
516
pos += 4
517
517
518
518
dumpCommandFlag := b .cfg .DumpCommandFlag
519
- if b .cfg .MariaDBDynamicLogPos && b .cfg .Flavor == mysql .MariaDBFlavor {
520
- // Add BINLOG_SEND_ANNOTATE_ROWS_EVENT flag when MariaDBDynamicLogPos is enabled.
519
+ if b .cfg .FillZeroLogPos && b .cfg .Flavor == mysql .MariaDBFlavor {
520
+ // Add BINLOG_SEND_ANNOTATE_ROWS_EVENT flag when FillZeroLogPos is enabled.
521
521
// This ensures the server sends ANNOTATE_ROWS_EVENT events which are needed
522
522
// for correct LogPos calculation in MariaDB 11.4+, where some events have LogPos=0.
523
523
dumpCommandFlag |= BINLOG_SEND_ANNOTATE_ROWS_EVENT
@@ -966,12 +966,12 @@ func (b *BinlogSyncer) handleEventAndACK(s *BinlogStreamer, e *BinlogEvent, need
966
966
967
967
// shouldCalculateDynamicLogPos determines if we should calculate LogPos dynamically for MariaDB events.
968
968
// This is needed for MariaDB 11.4+ when:
969
- // 1. MariaDBDynamicLogPos is enabled
969
+ // 1. FillZeroLogPos is enabled
970
970
// 2. We're using MariaDB flavor
971
971
// 3. The event has LogPos=0 (indicating server didn't set it)
972
972
// 4. The event is not artificial (not marked with LOG_EVENT_ARTIFICIAL_F flag)
973
973
func (b * BinlogSyncer ) shouldCalculateDynamicLogPos (e * BinlogEvent ) bool {
974
- return b .cfg .MariaDBDynamicLogPos &&
974
+ return b .cfg .FillZeroLogPos &&
975
975
b .cfg .Flavor == mysql .MariaDBFlavor &&
976
976
e .Header .LogPos == 0 &&
977
977
(e .Header .Flags & LOG_EVENT_ARTIFICIAL_F ) == 0
0 commit comments