Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: we only support MySQL version >= 8.0 for MySQL PITR (#1416)

h3n4lec8b82e7ae64
diff --git a/plugin/restore/mysql/mysql.go b/plugin/restore/mysql/mysql.go
index 321384f25e..81d07e941f 100644
--- a/plugin/restore/mysql/mysql.go
+++ b/plugin/restore/mysql/mysql.go
@@ -455,15 +455,15 @@ func getSafeName(baseName, suffix string) string {
return fmt.Sprintf("%s_%s", baseName[0:len(baseName)-extraCharacters], suffix)
}
-// checks the MySQL version is >=5.7
+// checks the MySQL version is >=8.0
func checkVersionForPITR(version string) error {
v, err := semver.Parse(version)
if err != nil {
return err
}
- v57 := semver.MustParse("5.7.0")
- if v.LT(v57) {
- return fmt.Errorf("version %s is not supported for PITR; the minimum supported version is 5.7", version)
+ v8 := semver.MustParse("8.0.0")
+ if v.LT(v8) {
+ return fmt.Errorf("version %s is not supported for PITR; the minimum supported version is 8.0", version)
}
return nil
}
diff --git a/plugin/restore/mysql/mysql_test.go b/plugin/restore/mysql/mysql_test.go
index bb5b5f08a4..2de8813bd9 100644
--- a/plugin/restore/mysql/mysql_test.go
+++ b/plugin/restore/mysql/mysql_test.go
@@ -100,7 +100,7 @@ func TestCheckVersionForPITR(t *testing.T) {
},
{
version: "5.7.0",
- err: false,
+ err: true,
},
{
version: "8.0.28",