You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by kr...@apache.org on 2009/01/15 18:04:18 UTC
svn commit: r734758 -
/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLClob.java
Author: kristwaa
Date: Thu Jan 15 09:04:17 2009
New Revision: 734758
URL: http://svn.apache.org/viewvc?rev=734758&view=rev
Log:
DERBY-3907: Save useful length information for Clobs in store.
Fixed a bug where the stream could be out of sync with the descriptor.
Also corrected some indentation.
Patch file: derby-3907-6a-SQLClob_stream_descriptor_sync.diff
Modified:
db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLClob.java
Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLClob.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLClob.java?rev=734758&r1=734757&r2=734758&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLClob.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLClob.java Thu Jan 15 09:04:17 2009
@@ -25,6 +25,7 @@
import org.apache.derby.iapi.jdbc.CharacterStreamDescriptor;
+import org.apache.derby.iapi.services.io.InputStreamUtil;
import org.apache.derby.iapi.services.io.StoredFormatIds;
import org.apache.derby.iapi.services.sanity.SanityManager;
@@ -245,9 +246,11 @@
if (stream instanceof Resetable) {
try {
((Resetable)stream).resetStream();
- } catch (IOException ioe) {
- throwStreamingIOException(ioe);
- }
+ // Make sure the stream is in sync with the descriptor.
+ InputStreamUtil.skipFully(stream, csd.getCurBytePos());
+ } catch (IOException ioe) {
+ throwStreamingIOException(ioe);
+ }
} else {
if (SanityManager.DEBUG) {
SanityManager.THROWASSERT("Unable to reset stream when " +