remove useless func per review
This commit is contained in:
parent
0310f9f27b
commit
59c1a24774
@ -364,7 +364,7 @@ func (this *Migrator) Migrate() (err error) {
|
|||||||
// Attempt to do this if AttemptInstantDDL is set.
|
// Attempt to do this if AttemptInstantDDL is set.
|
||||||
if this.migrationContext.AttemptInstantDDL {
|
if this.migrationContext.AttemptInstantDDL {
|
||||||
this.migrationContext.Log.Infof("Attempting to execute alter with ALGORITHM=INSTANT")
|
this.migrationContext.Log.Infof("Attempting to execute alter with ALGORITHM=INSTANT")
|
||||||
if err := this.attemptInstantDDL(); err == nil {
|
if err := this.applier.AttemptInstantDDL(); err == nil {
|
||||||
this.migrationContext.Log.Infof("Success! table %s.%s migrated instantly", sql.EscapeName(this.migrationContext.DatabaseName), sql.EscapeName(this.migrationContext.OriginalTableName))
|
this.migrationContext.Log.Infof("Success! table %s.%s migrated instantly", sql.EscapeName(this.migrationContext.DatabaseName), sql.EscapeName(this.migrationContext.OriginalTableName))
|
||||||
return nil
|
return nil
|
||||||
} else {
|
} else {
|
||||||
@ -745,13 +745,6 @@ func (this *Migrator) initiateServer() (err error) {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// attemptInstantDDL tries to apply the DDL statement directly to the table
|
|
||||||
// using a ALGORITHM=INSTANT assertion. If this fails, it will return an error,
|
|
||||||
// in which case the original algorithm should be used.
|
|
||||||
func (this *Migrator) attemptInstantDDL() (err error) {
|
|
||||||
return this.applier.AttemptInstantDDL()
|
|
||||||
}
|
|
||||||
|
|
||||||
// initiateInspector connects, validates and inspects the "inspector" server.
|
// initiateInspector connects, validates and inspects the "inspector" server.
|
||||||
// The "inspector" server is typically a replica; it is where we issue some
|
// The "inspector" server is typically a replica; it is where we issue some
|
||||||
// queries such as:
|
// queries such as:
|
||||||
|
Loading…
Reference in New Issue
Block a user