This commit is contained in:
crusader 2018-10-23 13:12:30 +09:00
parent ae4182b89e
commit 0a05e38d8b

View File

@ -22,11 +22,21 @@ func (m *MySqlMatcher) Type() string {
}
func (m *MySqlMatcher) Vendor(matchCtx *osm.MatchCtx) string {
return "Oracle"
v := "Oracle"
if _v, ok := matchCtx.GetAttribute("version"); ok {
if strings.Contains(_v, "MariaDB") {
v = "MariaDB"
}
}
return v
}
func (m *MySqlMatcher) Version(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
v := "UNKNOWN"
if _v, ok := matchCtx.GetAttribute("version"); ok {
v = _v
}
return v
}
func (m *MySqlMatcher) OsType(matchCtx *osm.MatchCtx) string {
@ -43,7 +53,6 @@ func (m *MySqlMatcher) Name(matchCtx *osm.MatchCtx) string {
if strings.Contains(v, "MariaDB") {
name = "MariaDB"
}
name = name + " (" + v + ")"
}
return name
}