Issue Details (XML | Word | Printable)

Key: DERBY-3970
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Kristian Waagan
Reporter: Kristian Waagan
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Derby

PositionedStoreStream doesn't initialize itself properly

Created: 02/Dec/08 10:06 PM   Updated: 04/May/09 06:22 PM
Component/s: JDBC
Affects Version/s: 10.3.3.0, 10.4.2.0, 10.5.1.1
Fix Version/s: 10.4.2.1, 10.5.1.1

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works derby-3970-1a-PositionedStoreStream_init.diff.txt 2008-12-02 10:09 PM Kristian Waagan 4 kB

Resolution Date: 08/Jan/09 11:27 AM


 Description  « Hide
When a PositionedStoreStream is created on top of a stream from store, it must properly initialize itself.
Proper initialization consists of initializing and resetting the stream to make sure the states of the streams are in sync.

A case of out of sync stream states was detected in a test where the Clob reference wasn't kept, but a new Clob object was created for each operation, i.e:
  rs.getClob(1).length();
  rs.getClob(1).getSubString(...);

A symptom of out of sync stream states is EOFException on a valid request.
I don't think the access style above is supposed to work, but the proper initialization should be performed anyway.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #722812 Wed Dec 03 08:54:12 UTC 2008 kristwaa DERBY-3970: PositionedStoreStream doesn't initialize itself properly.
Makes PositionedStoreStream initialize itself properly by calling initStream and resetStream on the underlying Resetable.
Patch file: DERBY-3970-1a-PositionedStoreStream_init.diff
Files Changed
MODIFY /db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/StoreStreamClob.java
MODIFY /db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/PositionedStoreStream.java
MODIFY /db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java

Repository Revision Date User Message
ASF #725286 Wed Dec 10 14:02:30 UTC 2008 kristwaa DERBY-3970: PositionedStoreStream doesn't initialize itself properly.
Merged revision 722812 from trunk.
Files Changed
MODIFY /db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/jdbc/StoreStreamClob.java
MODIFY /db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/jdbc/PositionedStoreStream.java
MODIFY /db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java