diff --git a/utils/version/mysql.go b/utils/version/mysql.go index 147e70c3a..d895259fa 100644 --- a/utils/version/mysql.go +++ b/utils/version/mysql.go @@ -48,6 +48,8 @@ func GetMySQLVersion(q *reform.Querier) (string, string, error) { vendor = "percona" case strings.Contains(strings.ToLower(ven), "mariadb"): vendor = "mariadb" + case strings.Contains(strings.ToLower(ven), "debian") && strings.Contains(strings.ToLower(ver), "mariadb"): + vendor = "mariadb" default: vendor = "oracle" } diff --git a/utils/version/mysql_test.go b/utils/version/mysql_test.go index 6c08b05b5..f9c94b72e 100644 --- a/utils/version/mysql_test.go +++ b/utils/version/mysql_test.go @@ -91,6 +91,21 @@ func TestGetMySQLVersion(t *testing.T) { wantVendor: "mariadb", wantVersion: "10.2", }, + { + name: "MariaDB-Debian", + mockedData: []mockedVariables{ + { + variable: "version", + value: "10.1.48-MariaDB-0+deb9u2", + }, + { + variable: "version_comment", + value: "Debian 9.13", + }, + }, + wantVendor: "mariadb", + wantVersion: "10.1", + }, } //nolint:paralleltest