You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Sunitha Kambhampati (JIRA)" <de...@db.apache.org> on 2006/02/02 02:31:31 UTC

[jira] Commented: (DERBY-856) modify setCharacterStreamInternal to take a long for the length, and perform the > max int check in the method

    [ http://issues.apache.org/jira/browse/DERBY-856?page=comments#action_12364906 ] 

Sunitha Kambhampati commented on DERBY-856:
-------------------------------------------

Thanks Narayanan for addressing my earlier comments.

I looked at the setCharacterStreamInternal_1.diff patch and the code changes look right to me. 

I have some minor comments. 

1) In the below code, it would be good to update the comments to reflect the use of the intLength 
variable instead of the length.

 @@ -662,19 +669,19 @@
                 // usableLength is the length of the data from stream that can
                 // be inserted which is min(colWidth,length) provided 
                 // length - colWidth has trailing blanks only
-                if (colWidth < length)
+                if (colWidth < intLength)
                     usableLength = colWidth;

Maybe also good to put in a comment in the code where we check for the value >2G-1 to indicate that the check is because currently Derby doesnt handle clob greater than 2G-1 chars. 

2) There are some diffs that show up that are not related to this change, possibly because of change in indentation. It would be nice if this can be cleaned up. Also the indentation seems not quite right between the if(reader==null) block and the next block where you check for MAX_VALUE.

Thanks for adding the testcase to test for the error message.  I applied your patch and have started a run of the largedata/LobLimits.java test. I'll post here once it completes ok.

Can you also mention if derbyall ran successfully or not. 

Sunitha.

> modify setCharacterStreamInternal to take a long for the length, and perform the > max int check in the method
> --------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-856
>          URL: http://issues.apache.org/jira/browse/DERBY-856
>      Project: Derby
>         Type: Improvement
>   Components: JDBC
>     Versions: 10.2.0.0
>  Environment: All Environments
>     Reporter: V.Narayanan
>     Assignee: V.Narayanan
>     Priority: Minor
>  Attachments: setCharacterStreamInternal.diff, setCharacterStreamInternal.stat, setCharacterStreamInternal_1.diff
>
> A similar change to setBinaryStreamInternal is being handled as part of DERBY-599. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira