OPENJPA-740 Handle case where size is unkown by defaulting back to old value (64KB)

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@920492 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Donald Woods 2010-03-08 20:23:03 +00:00
parent 1873fcd368
commit 82694335dd
1 changed files with 3 additions and 1 deletions

View File

@ -429,7 +429,9 @@ public class MySQLDictionary
@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