Skip to content

Commit 5448058

Browse files
authored
Merge pull request #543 from afumagalli98/fix-mysql-version
Fixed mysql version edition
2 parents bcb0319 + 5fdf515 commit 5448058

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

builder/common_builder/mysql.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
package common
1717

1818
import (
19+
"regexp"
1920
"strconv"
2021
"strings"
2122

@@ -65,6 +66,14 @@ func (b *CommonBuilder) getMySQLFeature() (*model.MySQLFeature, error) {
6566
continue
6667
}
6768
} else {
69+
pattern := "enterprise"
70+
regex := regexp.MustCompile(pattern)
71+
match := regex.FindString(strings.ToLower(instance.Version))
72+
73+
if match != "" {
74+
instance.Edition = model.MySQLEditionEnterprise
75+
}
76+
6877
instance, errInstance = b.fetcher.GetMySQLOldInstance(conf)
6978
if errInstance != nil {
7079
b.log.Errorf("Can't get MySQL old instance: %s", conf.Host)

0 commit comments

Comments
 (0)