diff --git a/go/logic/inspect.go b/go/logic/inspect.go index 96aadd672..904c247c1 100644 --- a/go/logic/inspect.go +++ b/go/logic/inspect.go @@ -249,6 +249,9 @@ func (isp *Inspector) validateGrants() error { if strings.Contains(grant, `REPLICATION SLAVE`) && strings.Contains(grant, ` ON *.*`) { foundReplicationSlave = true } + if strings.Contains(grant, `REPLICATION REPLICA`) && strings.Contains(grant, ` ON *.*`) { + foundReplicationSlave = true + } if strings.Contains(grant, fmt.Sprintf("GRANT ALL PRIVILEGES ON `%s`.*", isp.migrationContext.DatabaseName)) { foundDBAll = true } diff --git a/go/sql/builder.go b/go/sql/builder.go index 6e41eb4e1..764f33fd3 100644 --- a/go/sql/builder.go +++ b/go/sql/builder.go @@ -30,6 +30,7 @@ func EscapeName(name string) string { if unquoted, err := strconv.Unquote(name); err == nil { name = unquoted } + name = strings.ReplaceAll(name, "`", "``") return fmt.Sprintf("`%s`", name) }