diff --git a/dm/relay/relay.go b/dm/relay/relay.go index d9dd247f6df..125a42d76b0 100644 --- a/dm/relay/relay.go +++ b/dm/relay/relay.go @@ -245,7 +245,7 @@ func (r *Relay) process(ctx context.Context) error { } } else { _, metaPos := r.meta.Pos() - if neededBinlogName > metaPos.Name { + if mysql.CompareBinlogFileName(neededBinlogName, metaPos.Name) > 0 { isRelayMetaOutdated = true } }