@@ -128,11 +128,11 @@ type BinlogSyncerConfig struct {
128128
129129 EventCacheCount int
130130
131- // MariaDBDynamicLogPos enables dynamic LogPos calculation for MariaDB.
131+ // FillZeroLogPos enables dynamic LogPos calculation for MariaDB.
132132 // When enabled, automatically adds BINLOG_SEND_ANNOTATE_ROWS_EVENT flag
133133 // to ensure correct position calculation in MariaDB 11.4+.
134134 // Only works with MariaDB flavor.
135- MariaDBDynamicLogPos bool
135+ FillZeroLogPos bool
136136
137137 // SynchronousEventHandler is used for synchronous event handling.
138138 // This should not be used together with StartBackupWithHandler.
@@ -516,8 +516,8 @@ func (b *BinlogSyncer) writeBinlogDumpCommand(p mysql.Position) error {
516516 pos += 4
517517
518518 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.
521521 // This ensures the server sends ANNOTATE_ROWS_EVENT events which are needed
522522 // for correct LogPos calculation in MariaDB 11.4+, where some events have LogPos=0.
523523 dumpCommandFlag |= BINLOG_SEND_ANNOTATE_ROWS_EVENT
@@ -966,12 +966,12 @@ func (b *BinlogSyncer) handleEventAndACK(s *BinlogStreamer, e *BinlogEvent, need
966966
967967// shouldCalculateDynamicLogPos determines if we should calculate LogPos dynamically for MariaDB events.
968968// This is needed for MariaDB 11.4+ when:
969- // 1. MariaDBDynamicLogPos is enabled
969+ // 1. FillZeroLogPos is enabled
970970// 2. We're using MariaDB flavor
971971// 3. The event has LogPos=0 (indicating server didn't set it)
972972// 4. The event is not artificial (not marked with LOG_EVENT_ARTIFICIAL_F flag)
973973func (b * BinlogSyncer ) shouldCalculateDynamicLogPos (e * BinlogEvent ) bool {
974- return b .cfg .MariaDBDynamicLogPos &&
974+ return b .cfg .FillZeroLogPos &&
975975 b .cfg .Flavor == mysql .MariaDBFlavor &&
976976 e .Header .LogPos == 0 &&
977977 (e .Header .Flags & LOG_EVENT_ARTIFICIAL_F ) == 0
0 commit comments