--- a/src/Pure/General/sql.scala Fri Apr 28 14:50:18 2017 +0200
+++ b/src/Pure/General/sql.scala Fri Apr 28 15:06:46 2017 +0200
@@ -216,7 +216,10 @@
def set_double(stmt: PreparedStatement, i: Int, x: Double) { stmt.setDouble(i, x) }
def set_string(stmt: PreparedStatement, i: Int, x: String) { stmt.setString(i, x) }
def set_bytes(stmt: PreparedStatement, i: Int, bytes: Bytes)
- { stmt.setBinaryStream(i, bytes.stream(), bytes.length) }
+ {
+ if (bytes == null) stmt.setBytes(i, null)
+ else stmt.setBinaryStream(i, bytes.stream(), bytes.length)
+ }
def set_date(stmt: PreparedStatement, i: Int, date: Date)