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

Kathey Marsden commented on DERBY-3741:
---------------------------------------

Hi Suran,

After the wild goose chase of DERBY-3745 I have some more comments on the patch.

There is a problem with the patch setting rawLenth to the length without having 
the corresponding rawData value set. This led to problems like the one I saw 
with the getProcedures not returning the correct value.    The getLength() 
function should not attempt to set rawLength.
See 
https://issues.apache.org/jira/browse/DERBY-3795?focusedCommentId=12616661#action_12616661
for the getProcedures problem I mentioned.

Also you have code:
   if (rawLength != -1)
            return rawLength;
        if (stream != null) {
            if (rawLength != -1) {
                return rawLength;
              .....

There is no need to check rawLength again after checking that the stream is not 
null, because you would have already returned it.

Thanks 

Kathey



> 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: ClobMemTest.java, derby-3741-1.diff, 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