diff options
author | Dave Cramer <davec@fastcrypt.com> | 2003-12-12 00:26:20 +0000 |
---|---|---|
committer | Dave Cramer <davec@fastcrypt.com> | 2003-12-12 00:26:20 +0000 |
commit | 4bb71ef5194c8b6b24c95ae13fee988fc66e4cda (patch) | |
tree | 0536748375fbb2c59876bbe471051bb0da072aa6 /src | |
parent | f9d3ed65c43e04c595b097a59d4d1c4542d82794 (diff) | |
download | postgresql-4bb71ef5194c8b6b24c95ae13fee988fc66e4cda.tar.gz postgresql-4bb71ef5194c8b6b24c95ae13fee988fc66e4cda.zip |
binary stream patch by Kris Jurka fixes empty stream failure
Diffstat (limited to 'src')
-rw-r--r-- | src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java b/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java index 878ee4150d5..54aaf2eb8aa 100644 --- a/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java +++ b/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java @@ -26,7 +26,7 @@ import java.sql.Timestamp; import java.sql.Types; import java.util.Vector; -/* $PostgreSQL: pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java,v 1.42 2003/11/29 19:52:10 pgsql Exp $ +/* $PostgreSQL: pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java,v 1.43 2003/12/12 00:26:20 davec Exp $ * This class defines methods of the jdbc1 specification. This class is * extended by org.postgresql.jdbc2.AbstractJdbc2Statement which adds the jdbc2 * methods. The real Statement class (for jdbc1) is org.postgresql.jdbc1.Jdbc1Statement @@ -1479,6 +1479,11 @@ public abstract class AbstractJdbc1Statement implements BaseStatement { setBytes(parameterIndex, l_bytes); } + // x.read will return -1 not 0 on an empty InputStream + else if (l_bytesRead == -1) + { + setBytes(parameterIndex, new byte[0]); + } else { //the stream contained less data than they said |