Skip to content

Commit

Permalink
Rename function
Browse files Browse the repository at this point in the history
Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
  • Loading branch information
dbussink committed Jul 11, 2023
1 parent b7e8178 commit d149902
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions go/vt/mysqlctl/backupengine.go
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ func FindBackupToRestore(ctx context.Context, params RestoreParams, bhs []backup

// check if the backup can be used with this MySQL version.
if bm.MySQLVersion != "" {
if err := isMySQLVersionUpgradeCompatible(mysqlVersion, bm.MySQLVersion, bm.UpgradeSafe); err != nil {
if err := validateMySQLVersionUpgradeCompatible(mysqlVersion, bm.MySQLVersion, bm.UpgradeSafe); err != nil {
params.Logger.Warningf("Skipping backup %v/%v with incompatible MySQL version %v (upgrade safe: %v): %v", backupDir, bh.Name(), bm.MySQLVersion, bm.UpgradeSafe, err)
continue
}
Expand Down Expand Up @@ -490,7 +490,7 @@ func FindBackupToRestore(ctx context.Context, params RestoreParams, bhs []backup
return restorePath, nil
}

func isMySQLVersionUpgradeCompatible(to string, from string, upgradeSafe bool) error {
func validateMySQLVersionUpgradeCompatible(to string, from string, upgradeSafe bool) error {
// It's always safe to use the same version.
if to == from {
return nil
Expand Down

0 comments on commit d149902

Please sign in to comment.