{"record":{"id":"25123f6d8e016014","repo":"vitessio/vitess","slug":"w-error-checking-if-server-supports-disabling-re","errorCode":null,"errorMessage":"%w: error checking if server supports disabling redo log: %v","messagePattern":"%w: error checking if server supports disabling redo log: (.+?)","errorType":"error_code","errorClass":"ErrMySQLShellPreCheck","httpStatus":null,"severity":"error","filePath":"go/vt/mysqlctl/mysqlshellbackupengine.go","lineNumber":542,"sourceCode":"\t}\n\n\tif mysqlShellSpeedUpRestore {\n\t\tversion, err := params.Mysqld.GetVersionString(ctx)\n\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","sourceCodeStart":524,"sourceCodeEnd":560,"githubUrl":"https://github.com/vitessio/vitess/blob/01a25a7d176f94613b8d59d799f438380a8760e4/go/vt/mysqlctl/mysqlshellbackupengine.go#L524-L560","documentation":"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).","triggerScenarios":"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.","commonSituations":"Non-MySQL flavors (e.g. MariaDB) where redo-log disable support is undefined; corrupted or vendor-modified version strings yielding an unknown flavor mapping.","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"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"version, _ := mysqld.GetVersionString(ctx)\nif version != \"\" {\n    _, sv, _ := mysqlctl.ParseVersionString(version)\n    vstr := fmt.Sprintf(\"%d.%d.%d\", sv.Major, sv.Minor, sv.Patch)\n    _ = mysql.ServerVersionCapableOf(vstr) // errors here mean flavor is unsupported\n}","typeGuard":null,"tryCatchPattern":"if _, err := engine.ExecuteRestore(ctx, params, backupDir); err != nil {\n    if strings.Contains(err.Error(), \"supports disabling redo log\") {\n        // retry with mysqlShellSpeedUpRestore=false\n    }\n}","preventionTips":["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"],"tags":["mysql-shell","backup-restore","capability-check"],"backgroundTag":"unsupported-mysql-flavor","analyzedSha":"01a25a7d176f94613b8d59d799f438380a8760e4","analyzedAt":"2026-09-01T17:28:30.605Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}