db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From banda...@apache.org
Subject svn commit: r189606 - /incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLBlob.java
Date Wed, 08 Jun 2005 16:28:25 GMT
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());
     }
 }
 



Mime
View raw message