db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tomohito Nakayama (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-782) Improvement on org.apache.derby.impl.jdbc.EmbedBlob#length()
Date Fri, 23 Dec 2005 14:02:32 GMT
    [ http://issues.apache.org/jira/browse/DERBY-782?page=comments#action_12361194 ] 

Tomohito Nakayama commented on DERBY-782:
-----------------------------------------

I have tried and found length information, which is ignored now, does not have correct value.


naka@rufelza:~/derby/test/20051223$ runProgram.sh testLob4
Initializing jdb ...
> stop at org.apache.derby.impl.jdbc.BinaryToRawStream:94
Deferring breakpoint org.apache.derby.impl.jdbc.BinaryToRawStream:94.
It will be set after the class is loaded.
> run
run testLob4
Set uncaught java.lang.Throwable
Set deferred uncaught java.lang.Throwable
> 
VM Started: Set deferred breakpoint org.apache.derby.impl.jdbc.BinaryToRawStream:94

Breakpoint hit: "thread=main", org.apache.derby.impl.jdbc.BinaryToRawStream.<init>(),
line=94 bci=252
94    			int lenInBits = (((bl & 0xff) << 24) | ((v2 & 0xff) << 16) |
((v3 & 0xff) << 8) | (v4 & 0xff));

main[1] eval b1
com.sun.tools.example.debug.expr.ParseException: Name unknown: b1
 b1 = null
main[1] eval bl
 bl = 0
main[1] eval v2
 v2 = 0
main[1] eval v3
 v3 = 0
main[1] eval v4
 v4 = 0
main[1] cont
Here goes 1st stream
0
1
2
length:0
Here continue 1st stream
3
4
5
> 
The application exited

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

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


Mime
View raw message