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 "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2007/07/03 09:55:06 UTC

[jira] Created: (DERBY-2891) Clob.getCharacterStream(long,long) ignores position parameter for large (>32k) CLOBs

Clob.getCharacterStream(long,long) ignores position parameter for large (>32k) CLOBs
------------------------------------------------------------------------------------

                 Key: DERBY-2891
                 URL: https://issues.apache.org/jira/browse/DERBY-2891
             Project: Derby
          Issue Type: Bug
          Components: JDBC
    Affects Versions: 10.3.1.0
         Environment: JDBC 4.0
            Reporter: Knut Anders Hatlen
             Fix For: 10.3.1.1, 10.4.0.0


When a CLOB larger than 32k is fetched, Clob.getCharacterStream(long,long) ignores the position parameter and starts reading from the beginning of the CLOB. Will attach a repro.

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


[jira] Resolved: (DERBY-2891) Clob.getCharacterStream(long,long) ignores position parameter for large (>32k) CLOBs

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen resolved DERBY-2891.
---------------------------------------

    Resolution: Fixed

Committed to 10.3 with revision 553123.

> Clob.getCharacterStream(long,long) ignores position parameter for large (>32k) CLOBs
> ------------------------------------------------------------------------------------
>
>                 Key: DERBY-2891
>                 URL: https://issues.apache.org/jira/browse/DERBY-2891
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.1.0
>         Environment: JDBC 4.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>             Fix For: 10.3.1.1, 10.4.0.0
>
>         Attachments: ClobTest.java, d2891-test.diff, d2891.diff
>
>
> When a CLOB larger than 32k is fetched, Clob.getCharacterStream(long,long) ignores the position parameter and starts reading from the beginning of the CLOB. Will attach a repro.

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


[jira] Updated: (DERBY-2891) Clob.getCharacterStream(long,long) ignores position parameter for large (>32k) CLOBs

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-2891:
--------------------------------------

    Attachment: ClobTest.java

Repro for the bug. It creates a table which contains two CLOBs. One is 10 characters long and contains the string "1234567890". The other one is 33000 characters long and contains the same string as the first CLOB repeated 3300 times. Clob.getCharacterStream(4,3) is called on both CLOBs, and the contents of the streams are printed.

For the small CLOB, "456" is printed. For the large CLOB, "123456" is printed. Both of them should have printed "456".

> Clob.getCharacterStream(long,long) ignores position parameter for large (>32k) CLOBs
> ------------------------------------------------------------------------------------
>
>                 Key: DERBY-2891
>                 URL: https://issues.apache.org/jira/browse/DERBY-2891
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.1.0
>         Environment: JDBC 4.0
>            Reporter: Knut Anders Hatlen
>             Fix For: 10.3.1.1, 10.4.0.0
>
>         Attachments: ClobTest.java
>
>
> When a CLOB larger than 32k is fetched, Clob.getCharacterStream(long,long) ignores the position parameter and starts reading from the beginning of the CLOB. Will attach a repro.

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


[jira] Assigned: (DERBY-2891) Clob.getCharacterStream(long,long) ignores position parameter for large (>32k) CLOBs

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen reassigned DERBY-2891:
-----------------------------------------

    Assignee: Knut Anders Hatlen

> Clob.getCharacterStream(long,long) ignores position parameter for large (>32k) CLOBs
> ------------------------------------------------------------------------------------
>
>                 Key: DERBY-2891
>                 URL: https://issues.apache.org/jira/browse/DERBY-2891
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.1.0
>         Environment: JDBC 4.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>             Fix For: 10.3.1.1, 10.4.0.0
>
>         Attachments: ClobTest.java, d2891-test.diff, d2891.diff
>
>
> When a CLOB larger than 32k is fetched, Clob.getCharacterStream(long,long) ignores the position parameter and starts reading from the beginning of the CLOB. Will attach a repro.

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


[jira] Closed: (DERBY-2891) Clob.getCharacterStream(long,long) ignores position parameter for large (>32k) CLOBs

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen closed DERBY-2891.
-------------------------------------


> Clob.getCharacterStream(long,long) ignores position parameter for large (>32k) CLOBs
> ------------------------------------------------------------------------------------
>
>                 Key: DERBY-2891
>                 URL: https://issues.apache.org/jira/browse/DERBY-2891
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.1.4
>         Environment: JDBC 4.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>             Fix For: 10.3.1.4, 10.4.0.0
>
>         Attachments: ClobTest.java, d2891-test.diff, d2891.diff
>
>
> When a CLOB larger than 32k is fetched, Clob.getCharacterStream(long,long) ignores the position parameter and starts reading from the beginning of the CLOB. Will attach a repro.

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


[jira] Commented: (DERBY-2891) Clob.getCharacterStream(long,long) ignores position parameter for large (>32k) CLOBs

Posted by "V.Narayanan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12509818 ] 

V.Narayanan commented on DERBY-2891:
------------------------------------

The patch looks good to me knut. Thank you for handling this. I will run junit All on the attached patch and shall revert back with results, unless this has already been done.

> Clob.getCharacterStream(long,long) ignores position parameter for large (>32k) CLOBs
> ------------------------------------------------------------------------------------
>
>                 Key: DERBY-2891
>                 URL: https://issues.apache.org/jira/browse/DERBY-2891
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.1.0
>         Environment: JDBC 4.0
>            Reporter: Knut Anders Hatlen
>             Fix For: 10.3.1.1, 10.4.0.0
>
>         Attachments: ClobTest.java, d2891.diff
>
>
> When a CLOB larger than 32k is fetched, Clob.getCharacterStream(long,long) ignores the position parameter and starts reading from the beginning of the CLOB. Will attach a repro.

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


[jira] Commented: (DERBY-2891) Clob.getCharacterStream(long,long) ignores position parameter for large (>32k) CLOBs

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12510103 ] 

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

Committed revision 553111.

> Clob.getCharacterStream(long,long) ignores position parameter for large (>32k) CLOBs
> ------------------------------------------------------------------------------------
>
>                 Key: DERBY-2891
>                 URL: https://issues.apache.org/jira/browse/DERBY-2891
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.1.0
>         Environment: JDBC 4.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>             Fix For: 10.3.1.1, 10.4.0.0
>
>         Attachments: ClobTest.java, d2891-test.diff, d2891.diff
>
>
> When a CLOB larger than 32k is fetched, Clob.getCharacterStream(long,long) ignores the position parameter and starts reading from the beginning of the CLOB. Will attach a repro.

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


[jira] Updated: (DERBY-2891) Clob.getCharacterStream(long,long) ignores position parameter for large (>32k) CLOBs

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-2891:
--------------------------------------

    Attachment: d2891.diff

The bug is caused by a copy/paste error between two almost identical constructors in ClobUpdatableReader. The attached patch fixes the bug, and also makes one of the constructors only forward calls to the other, similar constructor. I have not run any regression tests on the patch.

> Clob.getCharacterStream(long,long) ignores position parameter for large (>32k) CLOBs
> ------------------------------------------------------------------------------------
>
>                 Key: DERBY-2891
>                 URL: https://issues.apache.org/jira/browse/DERBY-2891
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.1.0
>         Environment: JDBC 4.0
>            Reporter: Knut Anders Hatlen
>             Fix For: 10.3.1.1, 10.4.0.0
>
>         Attachments: ClobTest.java, d2891.diff
>
>
> When a CLOB larger than 32k is fetched, Clob.getCharacterStream(long,long) ignores the position parameter and starts reading from the beginning of the CLOB. Will attach a repro.

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


[jira] Updated: (DERBY-2891) Clob.getCharacterStream(long,long) ignores position parameter for large (>32k) CLOBs

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-2891:
--------------------------------------

    Attachment: d2891-test.diff

Thanks for looking at the patch, Narayanan. I have attached a new patch with a test case for the bug. Will start derbyall and suites.All now.

> Clob.getCharacterStream(long,long) ignores position parameter for large (>32k) CLOBs
> ------------------------------------------------------------------------------------
>
>                 Key: DERBY-2891
>                 URL: https://issues.apache.org/jira/browse/DERBY-2891
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.1.0
>         Environment: JDBC 4.0
>            Reporter: Knut Anders Hatlen
>             Fix For: 10.3.1.1, 10.4.0.0
>
>         Attachments: ClobTest.java, d2891-test.diff, d2891.diff
>
>
> When a CLOB larger than 32k is fetched, Clob.getCharacterStream(long,long) ignores the position parameter and starts reading from the beginning of the CLOB. Will attach a repro.

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