db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anurag Shekhar (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2450) Clob.Position returning wrong value when operating on Reader
Date Fri, 23 Mar 2007 11:03:32 GMT

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

Anurag Shekhar commented on DERBY-2450:
---------------------------------------

This particular position method accepts a String so we are quite safe as 
String can't grow beyond INTEGER.MAX_VALUE :). For larger search string 
the other method position (Clob, Clob) should be used but only if the 
Clob implementation support Clob of larger than INTEGER.MAX_VALUE.

Reusing the reader will be a great optimization but it's not possible 
unless we modify the UTF8Reader to support mark and reset. 256 I 
selected because the existing code was using it but changing it to 
something larger is not a problem.Increasing the buffer size will 
improve the performance when the Writer needs to be resettled  back  
previous read blocks. In other case it will add little value as the 
Writer itself does a caching and reads in block from the underlying 
stream and returns only the chars which it has in memory, subsequent 
read will make it fetch another full block in memory.

There are good number of tests related to position in BlobClob4BlobTest 
but some how they couldn't expose this bug. I suggest you to wait for 
the new implementation of clob before you add new tests as it will be 
nicer to know the implementation before writing the test so you can 
write test which exercises the path which is ignored by the current tests.




> Clob.Position returning wrong value when operating on Reader
> ------------------------------------------------------------
>
>                 Key: DERBY-2450
>                 URL: https://issues.apache.org/jira/browse/DERBY-2450
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.0.0
>         Environment: all
>            Reporter: Anurag Shekhar
>         Assigned To: Anurag Shekhar
>         Attachments: derby-2250.diff, PositionTest.java
>
>


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