[jira] [Resolved] (DERBY-4544) Referencing streaming CLOBs in (some) generated column clauses fails

2012-03-26 Thread Mike Matrigali (Resolved) (JIRA)

 [ 
https://issues.apache.org/jira/browse/DERBY-4544?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mike Matrigali resolved DERBY-4544.
---

Resolution: Fixed

> 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: 10.5.3.0, 10.6.1.0
>Reporter: Kristian Waagan
>Assignee: Rick Hillegas
>  Labels: CLOB, derby_triage10_8
> Fix For: 10.5.3.2, 10.6.2.3, 10.7.1.4, 10.9.0.0, 10.8.1.2
>
> Attachments: Test_4544.java, Test_4544.java, Test_4544.java, 
> derby-4544-01-ab-shortCircuitLengthOptimization.diff, 
> derby-4544-01-ac-shortCircuitLengthOptimization.diff
>
>
> 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.
> Workaround:
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Resolved] (DERBY-4544) Referencing streaming CLOBs in (some) generated column clauses fails

2011-04-11 Thread Rick Hillegas (JIRA)

 [ 
https://issues.apache.org/jira/browse/DERBY-4544?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rick Hillegas resolved DERBY-4544.
--

   Resolution: Fixed
Fix Version/s: 10.9.0.0
   10.8.1.1

Resolving this issue. We may want to figure out how to make the builtin 
operators (including length()) more efficient for this use case. However, I see 
that as a separate issue.

> 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: 10.5.3.0, 10.6.1.0
>Reporter: Kristian Waagan
>Assignee: Kristian Waagan
>  Labels: CLOB, derby_triage10_8
> Fix For: 10.8.1.1, 10.9.0.0
>
> Attachments: Test_4544.java, Test_4544.java, Test_4544.java, 
> derby-4544-01-ab-shortCircuitLengthOptimization.diff, 
> derby-4544-01-ac-shortCircuitLengthOptimization.diff
>
>
> 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.
> Workaround:
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira