db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2247) provide set methods for blob in embeded driver
Date Mon, 26 Mar 2007 10:19:32 GMT

    [ https://issues.apache.org/jira/browse/DERBY-2247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12484097
] 

Knut Anders Hatlen commented on DERBY-2247:
-------------------------------------------

Thanks for the follow-up patch, Anurag! It addresses most of my comments. However, I can't
see that it addresses my comments 1, 5 and 11. Kristian's questions 1-3, 5 and 7-15 and Suresh's
questions are also unanswered. Are you planning to address and/or comment on these questions
as well?

Two follow-up questions to the fix of for my comment #12 (LOBStreamControl.write(byte[],int,int,long)):
-            long finalLen = (dataBytes != null) ? dataBytes.length + b.length
-                    : b.length;
-            if (finalLen < MAX_BUF_SIZE)
+            if (pos + b.length < MAX_BUF_SIZE)
                 return updateData(b, off, len, pos);
             else {
                 init(dataBytes, pos);
             }

Shouldn't b.length have been len, in case we don't write the entire byte array?
And shouldn't the comparison use <= instead of <?

Actually, I'm also wondering whether this test in LOBStreamControl.write(int,long)
            if (pos + 1 < MAX_BUF_SIZE) {
should have been (pos < MAX_BUF_SIZE).

And should this test in LOBStreamControl.truncate()
            if (size < Integer.MAX_VALUE && size < MAX_BUF_SIZE) {
have been (size <= MAX_BUF_SIZE)?

As it is now, I don't think the last byte in the buffer will ever be used.

> provide set methods for blob in embeded driver
> ----------------------------------------------
>
>                 Key: DERBY-2247
>                 URL: https://issues.apache.org/jira/browse/DERBY-2247
>             Project: Derby
>          Issue Type: Sub-task
>          Components: JDBC
>         Environment: all
>            Reporter: Anurag Shekhar
>         Assigned To: Anurag Shekhar
>            Priority: Minor
>         Attachments: derby-2247-followup.diff, derby-2247-v3-usingStoreFactory.diff,
derby-2247-v4-usingStoreFactory.diff, derby-2247.diff, derby-2247v2-using_StoreFactory.diff
>
>


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


Mime
View raw message