提交 ac4525dd 编写于 作者: J Juergen Hoeller

Detect MariaDB as MySQL (for mariadb-java-client 2.4+ compatibility)

Closes gh-22344
上级 17caac8f
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 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.
......@@ -418,6 +418,9 @@ public abstract class JdbcUtils {
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) ||
......
......@@ -186,6 +186,12 @@
</bean>
<bean id="MySQL" class="org.springframework.jdbc.support.SQLErrorCodes">
<property name="databaseProductNames">
<list>
<value>MySQL</value>
<value>MariaDB</value>
</list>
</property>
<property name="badSqlGrammarCodes">
<value>1054,1064,1146</value>
</property>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册