openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgras...@apache.org
Subject svn commit: r1526968 - /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionaryFactory.java
Date Fri, 27 Sep 2013 16:05:01 GMT
Author: jgrassel
Date: Fri Sep 27 16:05:01 2013
New Revision: 1526968

URL: http://svn.apache.org/r1526968
Log:
OPENJPA-2432: MySQL dictionary can't be found from a valid connection

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionaryFactory.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionaryFactory.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionaryFactory.java?rev=1526968&r1=1526967&r2=1526968&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionaryFactory.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionaryFactory.java
Fri Sep 27 16:05:01 2013
@@ -95,7 +95,10 @@ public class DBDictionaryFactory {
                 dclass = dictionaryClassForString(getProtocol(meta.getURL()), conf);
             if (dclass != null && dclass.contains("MySQL")) {
                 // MariaDB returns "MySQL" for product name, need to verify by looking at
product version.
-                dclass = dictionaryClassForString(meta.getDatabaseProductVersion(), conf);
+                final String checkMariaDB = dictionaryClassForString(meta.getDatabaseProductVersion(),
conf);
+                if (checkMariaDB != null) {
+                    dclass = checkMariaDB;
+                }
             }
             if (dclass == null)
                 dclass = DBDictionary.class.getName();



Mime
View raw message