db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kristian Waagan (JIRA)" <j...@apache.org>
Subject [jira] Created: (DERBY-4544) Referencing streaming CLOBs in (some) generated column clauses fails
Date Wed, 10 Feb 2010 12:46:29 GMT
Referencing streaming CLOBs in (some) generated column clauses fails

                 Key: DERBY-4544
                 URL: https://issues.apache.org/jira/browse/DERBY-4544
             Project: Derby
          Issue Type: Bug
          Components: SQL
    Affects Versions:,
            Reporter: Kristian Waagan

Referencing a CLOB represented as a stream in generated columns can lead to data corruption
or that the query fails.

For instance, with 10.5:
create table t (id int, myclob clob, clen generated always as (length(myclob)));
# Insert CLOB using the streaming APIs (setCharacterStream).
The exception 'java.lang.ClassCastException: org.apache.derby.iapi.types.ReaderToUTF8Stream
cannot be cast to org.apache.derby.iapi.types.Resetable'

On trunk the same query results in data corruption, and this isn't detected before the value
is read back from store.

Don't use the streaming APIs when using CLOBs in generated columns. This increases the memory
footprint, and may not feasible for large CLOBs.

FYI, BLOB deals with this by materializing the value, which effectively equals to using the
workaround mentioned above.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message