diff -r 8365f1e7955e -r fe123d033e76 src/Pure/General/sql.scala --- a/src/Pure/General/sql.scala Tue Jun 11 16:48:20 2024 +0200 +++ b/src/Pure/General/sql.scala Tue Jun 11 21:32:26 2024 +0200 @@ -329,7 +329,8 @@ object bytes { def update(i: Int, bytes: Bytes): Unit = { if (bytes == null) rep.setBytes(i, null) - else rep.setBinaryStream(i, bytes.stream(), bytes.length) + else if (bytes.size > Int.MaxValue) throw new IllegalArgumentException + else rep.setBinaryStream(i, bytes.stream(), bytes.size.toInt) } def update(i: Int, bytes: Option[Bytes]): Unit = update(i, bytes.orNull) }