Hello.
Mike Matrigali wrote:
I am new to this issue and have not reviewed the patch yet. I am just
trying to understand what the correct behavior is. If this has
already been discussed feel free to point that out.I know Sunitha
submitted some fixes in this area, but she will not be able to look
at these for awhile.
In your test it is obvious that the first instance of the stream can
not be used anymore since you use the same variable. What if the
test instead did:
InputStream is1 = rs.getBinaryStream(1);
System.out.println("Here goes first stream");
System.out.println(is1.read());
System.out.println(is1.read());
System.out.println(is1.read());
InputStream is2 = rs.getBinaryStream(1);
System.out.println("Here goes 2nd stream");
System.out.println(is2.read());
System.out.println(is2.read());
System.out.println(is2.read());
System.out.println("Here goes first stream continuing");
System.out.println(is1.read());
System.out.println(is1.read());
System.out.println(is1.read());
As Daniel told already, is1 is closed when 2nd call of getBinaryStream.
Also if you have not done so, please always test a short blob (ie.
something shorter than 4k and a long blob (something longer than
32k or whatever is the page size of the table being used). There
are 2 very different paths through the code, depending on size of
the datatypes. In the short case they are passed around in memory
as a single object and in the long case there is an underlying
stream that should only be read once. I believe the new test covers
a lot of these cases.
I see .
I will add the test pattern for different size lob.
Best regards.
--
/*
Tomohito Nakayama
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Naka
http://www5.ocn.ne.jp/~tomohito/TopPage.html
*/