db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "V.Narayanan (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2604) Implement Clob support for locators
Date Sat, 26 May 2007 15:12:16 GMT

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

V.Narayanan commented on DERBY-2604:

There are a few more issues I haven't addressed in v4 that need to be addressed

1)  Add buffering for InputStreams by wrapping ClobLocatorInputStream in
      a BufferedInputStream and ClobLocatorReader in a BufferedReader.

2)  I noticed that in BlobLocatorInputStream, maxPos is used to store the size
     of the Blob. This is initialized in the constructor of BlobLocatorInputStream.
     This I observed serves the following purpose.
     a)   If the locator associated with the Blob object becomes invalid(e.g. due to
           a transaction commit) and the getBinaryStream is called to retrieve
           an InputStream the sqlLength() call in the constructor of BlobInputStream
           would throw an SQLException saying the locator associated with this 
           Blob is invalid. 

           On the other hand if this method call were not there we would
           get a stream from the Blob and would be informed of the locator invalidation
           only during the first call to any method on this InputStream. 

           I observed this when I ran BlobClob4BlobTest after enabling locators.
           In testClobAfterCommit() clob.getAsciiStream was not failing as expected 
           because the current ClobLocatorInputStream does not call clob.sqlLength()
           in its constructor.

3)  I also think using maxPos to return a CharacterStream subset requested by
      getCharacterStream(long, long) is better than the length() method implemented

Pls accept my apologies for this last moment change. I will be submitting a new v5 patch addressing
the above.
pls ignore v4. 

If anyone has reviewed v4 and find this addition inconvinient I will submit these changes
as a
follow up to v4.

> 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
>         Assigned To: V.Narayanan
>         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, 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.

View raw message