Fix MariaDB version detection
@@ -43,6 +43,15 @@ pub(crate) fn get_mysql_tags(database_url: &str) -> Result<BitFlags<Tags>, Strin
Some(version) => {
eprintln!("Version: {:?}", version);
+ // order matters...
+
+ if version.contains("MariaDB") {
+ tags |= Tags::Mariadb
+ } else {
+ if version.contains("vitess") {
+ tags |= Tags::Vitess;
+ }
+
if version.contains("5.6") {
tags |= Tags::Mysql56
}
@@ -54,13 +63,6 @@ pub(crate) fn get_mysql_tags(database_url: &str) -> Result<BitFlags<Tags>, Strin
if version.contains("8.") {
tags |= Tags::Mysql8
}
-
- if version.contains("MariaDB") {
- tags |= Tags::Mariadb
- }
-
- if version.contains("vitess") {
- tags |= Tags::Vitess;
}
eprintln!("Inferred tags: {:?}", tags);
