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.
|
||||
if this.migrationContext.AttemptInstantDDL {
|
||||
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))
|
||||
return nil
|
||||
} else {
|
||||
@ -745,13 +745,6 @@ func (this *Migrator) initiateServer() (err error) {
|
||||
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.
|
||||
// The "inspector" server is typically a replica; it is where we issue some
|
||||
// queries such as:
|
||||
|
Loading…
Reference in New Issue
Block a user