summaryrefslogtreecommitdiff
path: root/src/interfaces/jdbc/org/postgresql/jdbc2/PreparedStatement.java
diff options
context:
space:
mode:
authorPeter Mount <peter@retep.org.uk>2001-02-14 17:45:17 +0000
committerPeter Mount <peter@retep.org.uk>2001-02-14 17:45:17 +0000
commitbb7b71826d7a32752ace2f4574752a401fb7fa0f (patch)
treee273ace65b4d32e51e57d481c1be5099d7f3d4df /src/interfaces/jdbc/org/postgresql/jdbc2/PreparedStatement.java
parentc1abe85529da1cd995896fb88492d353eafbfc8d (diff)
downloadpostgresql-bb7b71826d7a32752ace2f4574752a401fb7fa0f.tar.gz
Web Feb 14 17:29:00 GMT 2001 peter@retep.org.uk
- Fixed bug in LargeObject & BlobOutputStream where the stream's output was not flushed when either the stream or the blob were closed. - Fixed PreparedStatement.setBinaryStream() where it ignored the length
Diffstat (limited to 'src/interfaces/jdbc/org/postgresql/jdbc2/PreparedStatement.java')
-rw-r--r--src/interfaces/jdbc/org/postgresql/jdbc2/PreparedStatement.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/interfaces/jdbc/org/postgresql/jdbc2/PreparedStatement.java b/src/interfaces/jdbc/org/postgresql/jdbc2/PreparedStatement.java
index a0f1d0713c..93a175267d 100644
--- a/src/interfaces/jdbc/org/postgresql/jdbc2/PreparedStatement.java
+++ b/src/interfaces/jdbc/org/postgresql/jdbc2/PreparedStatement.java
@@ -431,9 +431,11 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
// is buffered internally anyhow, so there would be no performance
// boost gained, if anything it would be worse!
int c=x.read();
- while(c>-1) {
+ int p=0;
+ while(c>-1 && p<length) {
los.write(c);
c=x.read();
+ p++;
}
los.close();
} catch(IOException se) {