Thomas Dudziak wrote:

On 6/15/06, Kathey Marsden <[EMAIL PROTECTED]> wrote:

The problem was just that  ddlutils was not handling the case where the
lob length was 0, but it was not null (an empty string was in the CLOB
column)
The hack of a patch below got me going.


Mhmm, the Clob Javadoc does not explicitly state what should happen if
the length is 0. Then again, it does not say that an exception will be
thrown, either, so I would assume that 0 should be regarded as a valid
value.
Anyway, I'll add your patch as a safety measure to DdlUtils

Please note, my hack of a patch is not ready and needs adjustment. It calls Clob.length() twice which may be a performance issue on some systems and I haven't tested it with BLOB's and looking at the code now I see it is flat out wrong. I'll file an issue with DdlUtils so someone can fix it right and will follow up with derby-dev on the getSubString issue. Even if fixed in DERBY it would great to see a fix in DdlUtils, since it would then work with existing Derby versions.


Kathey


Reply via email to