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

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

Thanks for the follow-up patch, Narayanan!

Most of it looks good, but I think this change in Clob positionX(Clob,long) is 
wrong:

@@ -559,18 +559,12 @@
                 index = string_.indexOf(searchstr.getSubString(1L,
                                                     (int) searchstr.length()),
                                         (int) start - 1);
+                index++;
             }
         } catch (java.sql.SQLException e) {

index should only be increased by one if it is not equal to -1. This didn't 
show up in the JUnit tests because the code is only used if the client runs 
against a 10.2 server or earlier. By the way, perhaps this line should have a 
comment which said something like "increase the index by one since String 
positions are 0-based and Clob positions are 1-based"?

> Implement Clob support for locators
> -----------------------------------
>
>                 Key: DERBY-2604
>                 URL: https://issues.apache.org/jira/browse/DERBY-2604
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Network Server
>            Reporter: V.Narayanan
>            Assignee: V.Narayanan
>             Fix For: 10.3.0.0
>
>         Attachments: ClobLocatorWork_v1.diff, ClobLocatorWork_v1.stat, 
> ClobLocatorWork_v2.diff, ClobLocatorWork_v2.stat, ClobLocatorWork_v3.diff, 
> ClobLocatorWork_v3.stat, ClobLocatorWork_v4.diff, ClobLocatorWork_v4.stat, 
> ClobLocatorWork_v5.diff, ClobLocatorWork_v5.stat, ClobLocatorWork_v6.diff, 
> ClobLocatorWork_v6.stat, ClobLocatorWork_v7.diff, ClobLocatorWork_v7.stat, 
> ConnectionLocatorWork_v2.diff, ConnectionLocatorWork_v4.diff
>
>


-- 
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