vitessio/vitess · error
mysqld >= 8.0.21 required to disable the redo log
Error message
mysqld >= 8.0.21 required to disable the redo log
What it means
ProcessCanDisableRedoLog queries MySQL to check whether the server supports disabling the InnoDB redo log (introduced in MySQL 8.0.21, via innodb_disable_redo_log). If the SELECT returns no rows, the MySQL version is too old to support the variable, so this error is thrown to signal the feature is unavailable. It is a capability gate, not an operational failure.
Source
Thrown at go/vt/mysqlctl/redo_log.go:41
func (mysqld *Mysqld) DisableRedoLog(ctx context.Context) error {
return mysqld.ExecuteSuperQuery(ctx, "ALTER INSTANCE DISABLE INNODB REDO_LOG")
}
func (mysqld *Mysqld) EnableRedoLog(ctx context.Context) error {
return mysqld.ExecuteSuperQuery(ctx, "ALTER INSTANCE ENABLE INNODB REDO_LOG")
}
func (mysqld *Mysqld) ProcessCanDisableRedoLog(ctx context.Context) (bool, error) {
qr, err := mysqld.FetchSuperQuery(ctx, "SELECT variable_value FROM performance_schema.global_status WHERE variable_name = 'innodb_redo_log_enabled'")
if err != nil {
// It's possible that the MySQL process can disable redo logging, but
// we were unable to connect in order to verify. Let's assume not and
// let the caller decide if they want to retry.
return false, err
}
if len(qr.Rows) == 0 {
return false, errors.New("mysqld >= 8.0.21 required to disable the redo log")
}
return true, nil
}
View on GitHub (pinned to 01a25a7d17)
Solutions
- Upgrade mysqld to MySQL 8.0.21 or later so the redo-log disable capability variable exists.
- If upgrading is not possible, skip the redo-log-disabling code path (don't attempt it on older servers).
- Add a preflight version check (mysqlctl.ParseVersionString) before attempting to disable the redo log and log a clear skip message.
Example fix
// before
// assumes redo log can be disabled on any MySQL
canDisable, err := mysqld.ProcessCanDisableRedoLog(ctx)
// after
// gate on version first
version, _ := mysqld.GetVersionString()
if mysqlctl.ParseVersionString(version).Major >= 8 && mysqlctl.ParseVersionString(version).Minor == 0 && mysqlctl.ParseVersionString(version).Patch >= 21 {
canDisable, err = mysqld.ProcessCanDisableRedoLog(ctx)
} else {
log.Info("mysqld < 8.0.21, skipping redo log disable")
} Defensive patterns
Strategy: validation
Validate before calling
version, err := mysqld.GetVersionString(ctx)
if err != nil { return err }
v := mysqlctl.ParseVersionString(version)
canDisableRedoLog := v.Major > 8 || (v.Major == 8 && (v.Minor > 0 || v.Patch >= 21))
if !canDisableRedoLog {
log.Info("mysqld < 8.0.21; redo log cannot be disabled")
} Try / catch
canDisable, err := mysqld.ProcessCanDisableRedoLog(ctx)
if err != nil {
if strings.Contains(err.Error(), "8.0.21") {
log.Info("redo log disable unsupported on this mysqld; continuing")
} else {
return vterrors.Wrapf(err, "checking redo log capability")
}
} Prevention
- Pin mysqld >= 8.0.21 wherever backup-time redo-log disabling is expected.
- Run a version preflight in tablet/bootstrap code before enabling redo-log optimization paths.
- Encode the minimum MySQL version in deployment checks rather than discovering it at runtime.
When it happens
Trigger: Calling ProcessCanDisableRedoLog against a mysqld instance older than 8.0.21: the query for the redo-log capability variable succeeds but returns an empty result set (len(qr.Rows) == 0), causing errors.New("mysqld >= 8.0.21 required to disable the redo log").
Common situations: Running backups or fast-restores with redo-log disabling (e.g. during restore to speed up data loading) against a MySQL 5.7 or MySQL 8.0.x (< 8.0.21) install; environments pinned to older MySQL builds such as Percona distributions lacking the feature.
Related errors
- running MySQL version %q is newer than backup MySQL version
- running MySQL version %q is older than backup MySQL version
- running MySQL version %q is too new for backup MySQL version
- cannot determine database flavor details for version %s
- cannot use backup between different flavors: %q vs. %q
AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01).
Data as JSON: /api/errors/9b6f8e4446a390d5.
Report an issue: GitHub.