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 "Tomohito Nakayama (JIRA)" <de...@db.apache.org> on 2005/12/20 15:30:31 UTC

[jira] Created: (DERBY-778) It should be restricted only once to retrieve stream, not only from resultset, but also from blob.

It should be restricted only once to retrieve stream, not only from resultset, but also from blob.
--------------------------------------------------------------------------------------------------

         Key: DERBY-778
         URL: http://issues.apache.org/jira/browse/DERBY-778
     Project: Derby
        Type: Bug
  Components: JDBC, Network Client  
    Reporter: Tomohito Nakayama
 Assigned to: Tomohito Nakayama 
 Attachments: testLob3.java

Restriction to retrieve stream from a result set  only once was made by DERBY-721.
However there remains *means of escape* to retrieve stream twice using Lob.

This means of escape should be restricted in order to avoid caching stream in Network Client Driver .

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-778) It should be restricted only once to retrieve stream, not only from resultset, but also from blob.

Posted by "Tomohito Nakayama (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-778?page=comments#action_12361049 ] 

Tomohito Nakayama commented on DERBY-778:
-----------------------------------------

I confirm javadoc of Java API and found next sentence .
 A Blob object is valid for the duration of the transaction in which is was created. 
http://java.sun.com/j2se/1.4.2/docs/api/java/sql/Blob.html

Futhermore, I found method java.sql.Blob#getBytes(long pos, int length) , which suggest api intend to make it able to get bytes from Blob object at randum .

I understand that Daniel's comment is right.

> It should be restricted only once to retrieve stream, not only from resultset, but also from blob.
> --------------------------------------------------------------------------------------------------
>
>          Key: DERBY-778
>          URL: http://issues.apache.org/jira/browse/DERBY-778
>      Project: Derby
>         Type: Bug
>   Components: JDBC, Network Client
>     Reporter: Tomohito Nakayama
>     Assignee: Tomohito Nakayama
>  Attachments: testLob3.java
>
> Restriction to retrieve stream from a result set  only once was made by DERBY-721.
> However there remains *means of escape* to retrieve stream twice using Lob.
> This means of escape should be restricted in order to avoid caching stream in Network Client Driver .

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-778) It should be restricted only once to retrieve stream, not only from resultset, but also from blob.

Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-778?page=comments#action_12360942 ] 

Daniel John Debrunner commented on DERBY-778:
---------------------------------------------

Restricting obtaining ia stream obtained by getXXXStream()  to one use per row is ok per the JDBC spec.

Reading the stream multiple times from a LOB object is not covered by that same wording in the JDBC spec.

I'm not sure this is a good idea, java.sql.Blob and Clob I think are designed to be re-used, as they are defined
to live until the end of the transaction.

> It should be restricted only once to retrieve stream, not only from resultset, but also from blob.
> --------------------------------------------------------------------------------------------------
>
>          Key: DERBY-778
>          URL: http://issues.apache.org/jira/browse/DERBY-778
>      Project: Derby
>         Type: Bug
>   Components: JDBC, Network Client
>     Reporter: Tomohito Nakayama
>     Assignee: Tomohito Nakayama
>  Attachments: testLob3.java
>
> Restriction to retrieve stream from a result set  only once was made by DERBY-721.
> However there remains *means of escape* to retrieve stream twice using Lob.
> This means of escape should be restricted in order to avoid caching stream in Network Client Driver .

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (DERBY-778) It should be restricted only once to retrieve stream, not only from resultset, but also from blob.

Posted by "Tomohito Nakayama (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-778?page=all ]
     
Tomohito Nakayama resolved DERBY-778:
-------------------------------------

    Resolution: Cannot Reproduce

> It should be restricted only once to retrieve stream, not only from resultset, but also from blob.
> --------------------------------------------------------------------------------------------------
>
>          Key: DERBY-778
>          URL: http://issues.apache.org/jira/browse/DERBY-778
>      Project: Derby
>         Type: Bug
>   Components: JDBC, Network Client
>     Reporter: Tomohito Nakayama
>     Assignee: Tomohito Nakayama
>  Attachments: testLob3.java
>
> Restriction to retrieve stream from a result set  only once was made by DERBY-721.
> However there remains *means of escape* to retrieve stream twice using Lob.
> This means of escape should be restricted in order to avoid caching stream in Network Client Driver .

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-778) It should be restricted only once to retrieve stream, not only from resultset, but also from blob.

Posted by "Tomohito Nakayama (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-778?page=all ]

Tomohito Nakayama updated DERBY-778:
------------------------------------

    Attachment: testLob3.java

Result of executing testLob3 :

naka@rufelza:~/derby/test/20051220_2$ java testLob3
Here goes first stream
0
1
2
Here goes 2nd stream
0
1
2

> It should be restricted only once to retrieve stream, not only from resultset, but also from blob.
> --------------------------------------------------------------------------------------------------
>
>          Key: DERBY-778
>          URL: http://issues.apache.org/jira/browse/DERBY-778
>      Project: Derby
>         Type: Bug
>   Components: JDBC, Network Client
>     Reporter: Tomohito Nakayama
>     Assignee: Tomohito Nakayama
>  Attachments: testLob3.java
>
> Restriction to retrieve stream from a result set  only once was made by DERBY-721.
> However there remains *means of escape* to retrieve stream twice using Lob.
> This means of escape should be restricted in order to avoid caching stream in Network Client Driver .

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira