Skip to content

Conversation

@dveeden
Copy link
Collaborator

@dveeden dveeden commented Dec 16, 2025

Issue: #1068

Tested with:

diff --git a/cmd/go-mysqlbinlog/main.go b/cmd/go-mysqlbinlog/main.go
index 8d322c3..3432e5f 100644
--- a/cmd/go-mysqlbinlog/main.go
+++ b/cmd/go-mysqlbinlog/main.go
@@ -9,6 +9,7 @@ import (
        "fmt"
        "log/slog"
        "os"
+       "time"
 
        "github.com/pingcap/errors"
 
@@ -51,6 +52,8 @@ func main() {
                SemiSyncEnabled:      *semiSync,
                UseDecimal:           true,
                MaxReconnectAttempts: 10,
+               HeartbeatPeriod:      time.Second * 10,
+               DumpCommandFlag:      replication.USE_HEARTBEAT_EVENT_V2,
        }
 
        logOpts := &slog.HandlerOptions{

This now reports:

=== HeartbeatLogEventV2 ===
Date: 1970-01-01 01:00:00
Log position: 158
Event size: 42
Heartbeat Event Version: 2
Binlog File Name: binlog.000001
Binlog Offset: 158

@dveeden dveeden requested a review from lance6716 December 16, 2025 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant