diff --git a/go/logic/migrator.go b/go/logic/migrator.go index c12c21f..876ee0f 100644 --- a/go/logic/migrator.go +++ b/go/logic/migrator.go @@ -796,6 +796,9 @@ func (this *Migrator) initiateInspector() (err error) { } else if this.migrationContext.InspectorIsAlsoApplier() && !this.migrationContext.AllowedRunningOnMaster { return fmt.Errorf("It seems like this migration attempt to run directly on master. Preferably it would be executed on a replica (and this reduces load from the master). To proceed please provide --allow-on-master. Inspector config=%+v, applier config=%+v", this.migrationContext.InspectorConnectionConfig, this.migrationContext.ApplierConnectionConfig) } + if this.migrationContext.InspectorIsAlsoApplier() && this.migrationContext.SwitchToRowBinlogFormat { + return fmt.Errorf("--switch-to-rbr is only allowed when inspecting a replica. This migration seems to run on the primary %+v", *this.migrationContext.ApplierConnectionConfig.ImpliedKey) + } if err := this.inspector.validateLogSlaveUpdates(); err != nil { return err }