db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel John Debrunner (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-782) Improvement on org.apache.derby.impl.jdbc.EmbedBlob#length()
Date Tue, 02 May 2006 23:49:48 GMT
    [ http://issues.apache.org/jira/browse/DERBY-782?page=comments#action_12377499 ] 

Daniel John Debrunner commented on DERBY-782:

The change 397313 includes as you say saving the length of the stream if it has to read the
entire length,
but in addition it has this change.

@@ -221,6 +229,14 @@
+                // If possible get the length from the encoded
+                // length at the front of the raw stream.
+                if ((myLength = biStream.getLength()) != -1) {
+                    biStream.close();
+                   return myLength;
+                }

Then, I'm sorry I missed referencing additional changes from DERBY-438.

SVN change 394109
This change makes the binary length encoded in the on-disk format  be written correctly when
the length is known.

SVN Change 393880
This change saves the encoded length when reading the stream from the disk,
this is then used by EmbedBlob in the 397313 change

Thanks for keeping me honest.

> Improvement on org.apache.derby.impl.jdbc.EmbedBlob#length()
> ------------------------------------------------------------
>          Key: DERBY-782
>          URL: http://issues.apache.org/jira/browse/DERBY-782
>      Project: Derby
>         Type: Bug

>   Components: JDBC
>     Reporter: Tomohito Nakayama
>      Fix For:
>  Attachments: testLob4.java
> Now, org.apache.derby.impl.jdbc.EmbedBlob#length() method read out whole  BinaryToRawStream
to know exact length.
> On the other hand,  BinaryToRawStream have some commented-out inplementation of having
information for length.
> I think the information of lengh in BinaryToRawStream should be restored to be used in
.org.apache.derby.impl.jdbc.EmbedBlob#length(), because read out whole stream can be expensive
processing when streamed information was large.
> There exists a subject that reliability of lengh information in BinaryToRawStream is

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message