[ 
https://issues.apache.org/jira/browse/DERBY-3741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615360#action_12615360
 ] 

Suran Jayathilaka commented on DERBY-3741:
------------------------------------------

In a subsequent discussion, Kathey pointed out that the following path might be 
the one to take.
For not so large CLOBs, if the stream is resettable, get the utf8length with 
readExternal() and return that IF it's not zero.
If it's zero, (i.e. stream could be longer than 65535) can use the UTF8Util 
class' skipUntilEOF() method to get how many chars are in the stream, 
but resetting the stream after that.
If the stream is not Resetable, will have to go with getString().length.


> SQL LENGTH function materializes CLOB into memory
> -------------------------------------------------
>
>                 Key: DERBY-3741
>                 URL: https://issues.apache.org/jira/browse/DERBY-3741
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.3.3.0, 10.4.1.3, 10.5.0.0
>            Reporter: Kathey Marsden
>            Assignee: Suran Jayathilaka
>         Attachments: LargeLengthClob.zip
>
>
> Similar to DERBY-3732, the SQL LENGTH function also materializes CLOB's into 
> memory.  See attached repro.

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

Reply via email to