Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
naka@rufelza:~/derby/dev/trunk$ cat /proc/version
Linux version 2.6.12-1-386 (horms@tabatha.lab.ultramonkey.org) (gcc version 4.0.2 20050917 (prerelease) (Debian 4.0.1-8)) #1 Tue Sep 27 12:41:08 JST 2005
naka@rufelza:~/derby/dev/trunk$ java -version
java version "1.4.2_10"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_10-b03)
Java HotSpot(TM) Client VM (build 1.4.2_10-b03, mixed mode)
naka@rufelza :~/derby/dev/trunk$ cat /proc/version Linux version 2.6.12-1-386 ( horms@tabatha.lab.ultramonkey.org ) (gcc version 4.0.2 20050917 (prerelease) (Debian 4.0.1-8)) #1 Tue Sep 27 12:41:08 JST 2005 naka@rufelza :~/derby/dev/trunk$ java -version java version "1.4.2_10" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_10-b03) Java HotSpot(TM) Client VM (build 1.4.2_10-b03, mixed mode)
-
Release Note Needed
Description
State of InputStream retrieved from ResultSet was not clean , if there exists previous InputStream retrieved from ResultSet .
Test code ...
PreparedStatement pst = conn.prepareStatement("insert into a(b) values");
byte[] data = new byte[1024 * 1024];
for(int i = 0;
i < 1024 * 1024;
i ++)
pst.setBinaryStream(1,new ByteArrayInputStream(data),data.length);
pst.executeUpdate();
pst.close();
st = conn.createStatement();
ResultSet rs = st.executeQuery("select b from a");
rs.next();
InputStream is = rs.getBinaryStream(1);
System.out.println("Here goes first stream");
System.out.println(is.read());
System.out.println(is.read());
System.out.println(is.read());
is = rs.getBinaryStream(1);
System.out.println("Here goes 2nd stream");
System.out.println(is.read());
System.out.println(is.read());
System.out.println(is.read());
Result ....
naka@rufelza:~/derby/test/20051121$ java testLob
Here goes first stream
0
1
2
Here goes 2nd stream
7
8
9
It is expected that result printed from first stream is as same as result printed from 2nd.
Attachments
Attachments
Issue Links
- blocks
-
DERBY-326 Improve streaming of large objects for network server and client
- Closed
- relates to
-
DERBY-880 jdbcapi/connectionJdbc20.java fails for server (10.1.2.2) and client (10.2.0.0) compatibility testing with > SQLSTATE(null): java.sql.SQLException: Stream of column value in result cannot be retrieved twice
- Closed