{"record":{"id":"3a6cc1a912e0f9e1","repo":"vitessio/vitess","slug":"w-mysql-version-doesn-t-support-disabling-the-re","errorCode":null,"errorMessage":"%w: MySQL version doesn't support disabling the redo log (must be >=8.0.21, current version: %s)","messagePattern":"%w: MySQL version doesn't support disabling the redo log \\(must be >=8\\.0\\.21, current version: (.+?)\\)","errorType":"error_code","errorClass":"ErrMySQLShellPreCheck","httpStatus":null,"severity":"error","filePath":"go/vt/mysqlctl/mysqlshellbackupengine.go","lineNumber":546,"sourceCode":"\t\tif err != nil {\n\t\t\treturn false, fmt.Errorf(\"%w: failed to fetch MySQL version: %v\", ErrMySQLShellPreCheck, err)\n\t\t}\n\n\t\t_, sv, err := ParseVersionString(version)\n\t\tif err != nil {\n\t\t\treturn false, fmt.Errorf(\"%w: failed to parse MySQL version (version: %s): %v\", ErrMySQLShellPreCheck, version, err)\n\t\t}\n\n\t\tversionStr := fmt.Sprintf(\"%d.%d.%d\", sv.Major, sv.Minor, sv.Patch)\n\n\t\tcapableOf := mysql.ServerVersionCapableOf(versionStr)\n\t\tcapable, err := capableOf(capabilities.DisableRedoLogFlavorCapability)\n\t\tif err != nil {\n\t\t\treturn false, fmt.Errorf(\"%w: error checking if server supports disabling redo log: %v\", ErrMySQLShellPreCheck, err)\n\t\t}\n\n\t\tif !capable {\n\t\t\treturn false, fmt.Errorf(\"%w: MySQL version doesn't support disabling the redo log (must be >=8.0.21, current version: %s)\", ErrMySQLShellPreCheck, versionStr)\n\t\t}\n\t}\n\n\treturn shouldDeleteUsers, nil\n}\n\nfunc (be *MySQLShellBackupEngine) handleSuperReadOnly(ctx context.Context, params RestoreParams) (func(), error) {\n\treadonly, err := params.Mysqld.IsSuperReadOnly(ctx)\n\tif err != nil {\n\t\treturn nil, vterrors.Wrap(err, fmt.Sprintf(\"checking if mysqld has super_read_only=enable: %v\", err))\n\t}\n\n\tparams.Logger.Infof(\"Is Super Read Only: %v\", readonly)\n\n\tif readonly {\n\t\tresetFunc, err := params.Mysqld.SetSuperReadOnly(ctx, false)\n\t\tif err != nil {\n\t\t\treturn nil, vterrors.Wrap(err, fmt.Sprintf(\"unable to disable super-read-only: %v\", err))","sourceCodeStart":528,"sourceCodeEnd":564,"githubUrl":"https://github.com/vitessio/vitess/blob/01a25a7d176f94613b8d59d799f438380a8760e4/go/vt/mysqlctl/mysqlshellbackupengine.go#L528-L564","documentation":"The redo-log disable feature (used to speed up mysql-shell restore) requires MySQL 8.0.21 or newer. restorePreCheck rejects the restore when the parsed server version is older, telling the operator the minimum required version.","triggerScenarios":"ExecuteRestore -> restorePreCheck with mysqlShellSpeedUpRestore=true when capableOf(DisableRedoLogFlavorCapability) returns capable=false for the running server's version.","commonSituations":"Restoring onto an older MySQL 8.0.x (pre 8.0.21) or 5.7 instance while the speed-up flag is enabled; forgetting to lower mysqlShellSpeedUpRestore after a downgrade of the target MySQL.","solutions":["Upgrade the target MySQL server to >= 8.0.21","Set mysqlShellSpeedUpRestore=false in the backupengine config so the redo-log disable step is skipped","Re-run the restore after the version/config change"],"exampleFix":"// before (backupengine config)\n\"mysqlShellSpeedUpRestore\": true  // on MySQL 8.0.19\n// after\n\"mysqlShellSpeedUpRestore\": false","handlingStrategy":"validation","validationCode":"version, _ := mysqld.GetVersionString(ctx)\n_, sv, err := mysqlctl.ParseVersionString(version)\nif err == nil && (sv.Major < 8 || (sv.Major == 8 && (sv.Minor < 0 || sv.Patch < 21))) {\n    log.Warn(\"MySQL too old for redo-log speed-up; need >= 8.0.21\", slog.String(\"version\", version))\n}","typeGuard":null,"tryCatchPattern":"if _, err := engine.ExecuteRestore(ctx, params, backupDir); err != nil {\n    if strings.Contains(err.Error(), \"must be >=8.0.21\") {\n        // upgrade MySQL or set mysqlShellSpeedUpRestore=false and retry\n    }\n}","preventionTips":["Pin target MySQL >= 8.0.21 wherever mysqlShellSpeedUpRestore is enabled","Re-evaluate the speed-up flag after any MySQL downgrade","Check the version as part of pre-restore health checks"],"tags":["mysql-shell","backup-restore","mysql-version"],"backgroundTag":"mysql-version-too-old","analyzedSha":"01a25a7d176f94613b8d59d799f438380a8760e4","analyzedAt":"2026-09-01T17:28:30.605Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}