openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r920492 - /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MySQLDictionary.java
Date Mon, 08 Mar 2010 20:23:03 GMT
Author: dwoods
Date: Mon Mar  8 20:23:03 2010
New Revision: 920492

URL: http://svn.apache.org/viewvc?rev=920492&view=rev
Log:
OPENJPA-740 Handle case where size is unkown by defaulting back to old value (64KB)

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

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MySQLDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MySQLDictionary.java?rev=920492&r1=920491&r2=920492&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MySQLDictionary.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MySQLDictionary.java
Mon Mar  8 20:23:03 2010
@@ -429,7 +429,9 @@
     @Override
     public String getTypeName(Column col) {
         if (col.getType() == Types.BLOB) {
-            if (col.getSize() <= 255)
+            if (col.getSize() == 0)   // unknown size
+                return blobTypeName;  // return old default of 64KB
+            else if (col.getSize() <= 255)
                 return tinyBlobTypeName;
             else if (col.getSize() <= 65535)
                 return blobTypeName;  // old default of 64KB



Mime
View raw message