summaryrefslogtreecommitdiff
path: root/src/interfaces/jdbc/org/postgresql/Connection.java
diff options
context:
space:
mode:
authorPeter Mount <peter@retep.org.uk>2001-01-31 08:26:02 +0000
committerPeter Mount <peter@retep.org.uk>2001-01-31 08:26:02 +0000
commit8439a83d84fb159a790ed2b6d14d4151b9890857 (patch)
tree867314ef119cc9a0713548c2ed0e676a124d0aad /src/interfaces/jdbc/org/postgresql/Connection.java
parentdca0762efc1b4f84c0185b5464f94f7d66bbe566 (diff)
downloadpostgresql-8439a83d84fb159a790ed2b6d14d4151b9890857.tar.gz
Tue Jan 30 22:24:00 GMT 2001 peter@retep.org.uk
- Fixed bug where Statement.setMaxRows() was a global setting. Now limited to just itself. - Changed LargeObject.read(byte[],int,int) to return the actual number of bytes read (used to be void). - LargeObject now supports InputStream's! - PreparedStatement.setBinaryStream() now works! - ResultSet.getBinaryStream() now returns an InputStream that doesn't copy the blob into memory first! - Connection.isClosed() now tests to see if the connection is still alive rather than if it thinks it's alive.
Diffstat (limited to 'src/interfaces/jdbc/org/postgresql/Connection.java')
-rw-r--r--src/interfaces/jdbc/org/postgresql/Connection.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/interfaces/jdbc/org/postgresql/Connection.java b/src/interfaces/jdbc/org/postgresql/Connection.java
index d852538846..87fbc337a7 100644
--- a/src/interfaces/jdbc/org/postgresql/Connection.java
+++ b/src/interfaces/jdbc/org/postgresql/Connection.java
@@ -10,7 +10,7 @@ import org.postgresql.largeobject.*;
import org.postgresql.util.*;
/**
- * $Id: Connection.java,v 1.13 2001/01/18 17:37:12 peter Exp $
+ * $Id: Connection.java,v 1.14 2001/01/31 08:26:01 peter Exp $
*
* This abstract class is used by org.postgresql.Driver to open either the JDBC1 or
* JDBC2 versions of the Connection class.
@@ -22,7 +22,7 @@ public abstract class Connection
public PG_Stream pg_stream;
// This is set by org.postgresql.Statement.setMaxRows()
- public int maxrows = 0; // maximum no. of rows; 0 = unlimited
+ //public int maxrows = 0; // maximum no. of rows; 0 = unlimited
private String PG_HOST;
private int PG_PORT;
@@ -414,6 +414,11 @@ public abstract class Connection
*/
public java.sql.ResultSet ExecSQL(String sql,java.sql.Statement stat) throws SQLException
{
+ // added Jan 30 2001 to correct maxrows per statement
+ int maxrows=0;
+ if(stat!=null)
+ maxrows=stat.getMaxRows();
+
// added Oct 7 1998 to give us thread safety.
synchronized(pg_stream) {
// Deallocate all resources in the stream associated