db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Farrukh Najmi <Farrukh.Na...@Sun.COM>
Subject Re: A truncation error was encountered tryin,g to shrink BLOB 'XX-RESOLVE-XX' to length 1048576.
Date Wed, 07 Jun 2006 15:03:10 GMT
Bernt M. Johnsen wrote:

>>> Thank you Dan! That sounds like the problem.
>>> BTW I am curious why the 2G is not the default?
>>> Is there a performance / space downside to specifying BLOB(2G) always?
>> It's due to Derby's history. BLOB/CLOB datatypes were added while
>> Cloudscape was closed-sourced at IBM and thus matched DB2 in behaviour.
>> There are no space concerns, no pre-allocation of space. The length only
>> specifies the largest possible BLOB/CLOB value for that column.
> Then, a largest possible default (2G?) would be a user-friendly
> improvement to Derby.

My project had to jump thru hoops to cope with this out because we use 
hibernate 2.1 which uses a GenericDialect for Derby
that did not support setting length of blob type. We had to use 
hibernate extension features to create a DerbyDialect that handled this.

So yes, please *do* change the default to 2GB or whatever is the max if 
there is no performance and size penalty.


View raw message