Skip to content

Commit 82ebf93

Browse files
committed
fix linting and mysql errors on ci
1 parent 9d46fb3 commit 82ebf93

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

replication/replication_test.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ import (
1414
"github.com/stretchr/testify/require"
1515
"github.com/stretchr/testify/suite"
1616

17-
"github.com/goccy/go-json"
1817
"github.com/go-mysql-org/go-mysql/client"
1918
"github.com/go-mysql-org/go-mysql/mysql"
2019
"github.com/go-mysql-org/go-mysql/test_util"
2120
"github.com/go-mysql-org/go-mysql/utils"
21+
"github.com/goccy/go-json"
2222
)
2323

2424
var testOutputLogs = flag.Bool("out", false, "output binlog event")
@@ -494,7 +494,11 @@ func (t *testSyncerSuite) testFloatWithTrailingZerosCase(useTrailingZero bool) {
494494
t.testExecute(`INSERT INTO test_float_zeros VALUES (2, '{"f": 1.100}')`)
495495

496496
// Get current position
497-
r, err := t.c.Execute("SHOW MASTER STATUS")
497+
showBinlogStatus := "SHOW BINARY LOG STATUS"
498+
if eq, err := t.c.CompareServerVersion("8.4.0"); (err == nil) && (eq < 0) {
499+
showBinlogStatus = "SHOW MASTER STATUS"
500+
}
501+
r, err := t.c.Execute(showBinlogStatus)
498502
require.NoError(t.T(), err)
499503
binFile, _ := r.GetString(0, 0)
500504
binPos, _ := r.GetInt(0, 1)

0 commit comments

Comments
 (0)