From 347d3713ba25222182ae9d5451e8d95d9cde0eb1 Mon Sep 17 00:00:00 2001 From: Matt Lord Date: Tue, 7 Jan 2025 17:46:25 -0500 Subject: [PATCH] Add missing test Signed-off-by: Matt Lord --- go/mysql/replication_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/go/mysql/replication_test.go b/go/mysql/replication_test.go index c9a54485497..680cb9e68dc 100644 --- a/go/mysql/replication_test.go +++ b/go/mysql/replication_test.go @@ -17,6 +17,7 @@ limitations under the License. package mysql import ( + "math" "reflect" "testing" @@ -37,6 +38,10 @@ func TestComBinlogDump(t *testing.T) { cConn.Close() }() + // Try to write a ComBinlogDump packet with a position greater than 4 bytes. + err := cConn.WriteComBinlogDump(1, "moofarm", math.MaxInt64, 0x0d0e) + require.Error(t, err) + // Write ComBinlogDump packet, read it, compare. if err := cConn.WriteComBinlogDump(0x01020304, "moofarm", 0x05060708, 0x090a); err != nil { t.Fatalf("WriteComBinlogDump failed: %v", err)