MCPcopy Create free account
hub / github.com/apecloud/myduckserver / getPrimaryLogPosition

Function getPrimaryLogPosition

binlogreplication/binlog_replication_test.go:723–732  ·  view source on GitHub ↗
(t *testing.T, gtidEnabled bool)

Source from the content-addressed store, hash-verified

721}
722
723func getPrimaryLogPosition(t *testing.T, gtidEnabled bool) (string, string) {
724 rows, err := primaryDatabase.Queryx("SHOW BINARY LOG STATUS;")
725 require.NoError(t, err)
726 primaryStatus := convertMapScanResultToStrings(readNextRow(t, rows))
727 sourceLogFile := primaryStatus["File"].(string)
728 sourceLogPos := primaryStatus["Position"].(string)
729 require.NoError(t, rows.Close())
730
731 return sourceLogFile, sourceLogPos
732}
733
734func getReplicaLogPosition(t *testing.T) (string, string) {
735 rows, err := replicaDatabase.Queryx("SHOW REPLICA STATUS;")

Callers 2

queryGtidFunction · 0.85
startReplicationFunction · 0.85

Calls 3

readNextRowFunction · 0.85
CloseMethod · 0.65

Tested by

no test coverage detected