Skip to content

Commit

Permalink
Treat MariaDB as an independent database type
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-enfuse-io authored and snicoll committed Aug 23, 2022
1 parent 4557158 commit 21577c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2021 the original author or authors.
* Copyright 2002-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -49,6 +49,7 @@
*
* @author Thomas Risberg
* @author Juergen Hoeller
* @author Ben Blinebury
*/
public abstract class JdbcUtils {

Expand Down Expand Up @@ -455,9 +456,6 @@ public static String commonDatabaseName(@Nullable String source) {
if (source != null && source.startsWith("DB2")) {
name = "DB2";
}
else if ("MariaDB".equals(source)) {
name = "MySQL";
}
else if ("Sybase SQL Server".equals(source) ||
"Adaptive Server Enterprise".equals(source) ||
"ASE".equals(source) ||
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -27,6 +27,7 @@
*
* @author Thomas Risberg
* @author Juergen Hoeller
* @author Ben Blinebury
*/
public class JdbcUtilsTests {

Expand All @@ -37,6 +38,7 @@ public void commonDatabaseName() {
assertThat(JdbcUtils.commonDatabaseName("Sybase SQL Server")).isEqualTo("Sybase");
assertThat(JdbcUtils.commonDatabaseName("Adaptive Server Enterprise")).isEqualTo("Sybase");
assertThat(JdbcUtils.commonDatabaseName("MySQL")).isEqualTo("MySQL");
assertThat(JdbcUtils.commonDatabaseName("MariaDB")).isEqualTo("MariaDB");
}

@Test
Expand Down

0 comments on commit 21577c4

Please sign in to comment.