Skip to content

Commit

Permalink
fix: issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Fizic committed Mar 19, 2024
1 parent b14d4cf commit b084880
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/mysql/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type readOnlyResult struct {
}

type ServerUUIDResult struct {
ServerUUID string `db:"@@server_uuid"`
ServerUUID string `db:"server_uuid"`
}

// CascadeNodeConfiguration is a dcs node configuration for cascade mysql replica
Expand Down
2 changes: 1 addition & 1 deletion internal/mysql/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ func (n *Node) GetBinlogs() ([]Binlog, error) {
// UUID returns server_uuid
func (n *Node) UUID() (uuid.UUID, error) {
var r ServerUUIDResult
err := n.queryRow(queryIsReadOnly, nil, &r)
err := n.queryRow(queryGetUUID, nil, &r)
if err != nil {
return uuid.UUID{}, err
}
Expand Down
2 changes: 1 addition & 1 deletion internal/mysql/queries.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ var DefaultQueries = map[string]string{
queryReplicaStatus: `SHOW REPLICA STATUS FOR CHANNEL :channel`,
queryGetVersion: `SELECT sys.version_major() AS MajorVersion, sys.version_minor() AS MinorVersion, sys.version_patch() AS PatchVersion`,
queryGTIDExecuted: `SELECT @@GLOBAL.gtid_executed as Executed_Gtid_Set`,
queryGetUUID: `SELECT @@server_uuid`,
queryGetUUID: `SELECT @@server_uuid as server_uuid`,
queryShowBinaryLogs: `SHOW BINARY LOGS`,
querySlaveHosts: `SHOW SLAVE HOSTS`,
queryReplicationLag: ``,
Expand Down

0 comments on commit b084880

Please sign in to comment.