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 ba...@apache.org on 2005/06/08 18:28:25 UTC
svn commit: r189606 -
/incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLBlob.java
Author: bandaram
Date: Wed Jun 8 09:28:23 2005
New Revision: 189606
URL: http://svn.apache.org/viewcvs?rev=189606&view=rev
Log:
Derby-217: Fix the problem introduced by fix for Derby-175. Set the SQLBlob correctly if the value is not null.
A test case needs to be added later. I will keep the bug open till a test case is added.
Submitted by Satheesh Bandaram (Satheesh@sourcery.org)
Modified:
incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLBlob.java
Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLBlob.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLBlob.java?rev=189606&r1=189605&r2=189606&view=diff
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLBlob.java (original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLBlob.java Wed Jun 8 09:28:23 2005
@@ -187,8 +187,16 @@
return TypeId.BLOB_PRECEDENCE; // not really used
}
- public void setInto(PreparedStatement ps, int position) throws SQLException, StandardException {
- ps.setBlob(position,null);
+ public void setInto(PreparedStatement ps, int position)
+ throws SQLException, StandardException
+ {
+ if (isNull()) {
+ ps.setBlob(position, null);
+ return;
+ }
+
+ // This may cause problems for streaming blobs, by materializing the whole blob.
+ ps.setBytes(position, getBytes());
}
}