vitessio/vitess · error · ErrMySQLShellPreCheck
%w: error checking if server supports disabling redo log: %v
Error message
%w: error checking if server supports disabling redo log: %v
What it means
Once parsed, restorePreCheck asks the flavor capability table whether the server version supports the DisableRedoLogFlavorCapability. This error wraps an unexpected failure from that capability lookup itself (not a negative answer, but an error determining capability).
Source
Thrown at go/vt/mysqlctl/mysqlshellbackupengine.go:542
}
if mysqlShellSpeedUpRestore {
version, err := params.Mysqld.GetVersionString(ctx)
if err != nil {
return false, fmt.Errorf("%w: failed to fetch MySQL version: %v", ErrMySQLShellPreCheck, err)
}
_, sv, err := ParseVersionString(version)
if err != nil {
return false, fmt.Errorf("%w: failed to parse MySQL version (version: %s): %v", ErrMySQLShellPreCheck, version, err)
}
versionStr := fmt.Sprintf("%d.%d.%d", sv.Major, sv.Minor, sv.Patch)
capableOf := mysql.ServerVersionCapableOf(versionStr)
capable, err := capableOf(capabilities.DisableRedoLogFlavorCapability)
if err != nil {
return false, fmt.Errorf("%w: error checking if server supports disabling redo log: %v", ErrMySQLShellPreCheck, err)
}
if !capable {
return false, fmt.Errorf("%w: MySQL version doesn't support disabling the redo log (must be >=8.0.21, current version: %s)", ErrMySQLShellPreCheck, versionStr)
}
}
return shouldDeleteUsers, nil
}
func (be *MySQLShellBackupEngine) handleSuperReadOnly(ctx context.Context, params RestoreParams) (func(), error) {
readonly, err := params.Mysqld.IsSuperReadOnly(ctx)
if err != nil {
return nil, vterrors.Wrap(err, fmt.Sprintf("checking if mysqld has super_read_only=enable: %v", err))
}
params.Logger.Infof("Is Super Read Only: %v", readonly)
View on GitHub (pinned to 01a25a7d17)
Solutions
- Verify the server is a genuine MySQL 8.x flavor supported by Vitess capability checks
- Use a standard MySQL >= 8.0.21 build for the speed-up restore
- Disable mysqlShellSpeedUpRestore if the flavor cannot support redo-log disabling
Defensive patterns
Strategy: fallback
Validate before calling
version, _ := mysqld.GetVersionString(ctx)
if version != "" {
_, sv, _ := mysqlctl.ParseVersionString(version)
vstr := fmt.Sprintf("%d.%d.%d", sv.Major, sv.Minor, sv.Patch)
_ = mysql.ServerVersionCapableOf(vstr) // errors here mean flavor is unsupported
} Try / catch
if _, err := engine.ExecuteRestore(ctx, params, backupDir); err != nil {
if strings.Contains(err.Error(), "supports disabling redo log") {
// retry with mysqlShellSpeedUpRestore=false
}
} Prevention
- Stick to MySQL flavors officially supported by Vitess capability tables
- Avoid vendor-modified version strings that break flavor detection
- Treat redo-log speed-up as optional and fall back to the default restore path
When it happens
Trigger: ExecuteRestore -> restorePreCheck when mysql.ServerVersionCapableOf(versionStr) returns a capableOf function whose invocation returns an error for capabilities.DisableRedoLogFlavorCapability, typically because the flavor is not recognized/supported for that capability.
Common situations: Non-MySQL flavors (e.g. MariaDB) where redo-log disable support is undefined; corrupted or vendor-modified version strings yielding an unknown flavor mapping.
Related errors
- %w: "progressFile" needs to be empty as vitess always starts
- %w: "skipBinlog" needs to set to true
- %w: failed to fetch MySQL version: %v
- %w: failed to parse MySQL version (version: %s): %v
- %w: MySQL version doesn't support disabling the redo log (mu
AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01).
Data as JSON: /api/errors/25123f6d8e016014.
Report an issue: GitHub.