summaryrefslogtreecommitdiff
path: root/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java
diff options
context:
space:
mode:
authorBarry Lind <barry@xythos.com>2002-11-14 05:35:45 +0000
committerBarry Lind <barry@xythos.com>2002-11-14 05:35:45 +0000
commitcfae07331ccad4f28ea00dc7e8f1ba01ec979ec5 (patch)
treeacb06b120d2c7892519ce021f4eef825285c05e4 /src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java
parent4a57ef6826c883d789fec23b07161b018fae2bce (diff)
downloadpostgresql-cfae07331ccad4f28ea00dc7e8f1ba01ec979ec5.tar.gz
Applied patch submitted by Mats Lofkvist fixing serious threading problem introduced in beta3.
Fixed bug with using setNull()(or setXXX(x, null)) and serverside prepare statements. Improved error message when using a connection object that has already been closed. Modified Files: jdbc/org/postgresql/errors.properties jdbc/org/postgresql/core/Encoding.java jdbc/org/postgresql/core/QueryExecutor.java jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
Diffstat (limited to 'src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java')
-rw-r--r--src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java b/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java
index f161c6616c..e22cf53144 100644
--- a/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java
+++ b/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java
@@ -14,7 +14,7 @@ import org.postgresql.largeobject.LargeObjectManager;
import org.postgresql.util.*;
-/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1Connection.java,v 1.12 2002/10/20 02:55:50 barry Exp $
+/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1Connection.java,v 1.13 2002/11/14 05:35:45 barry Exp $
* This class defines methods of the jdbc1 specification. This class is
* extended by org.postgresql.jdbc2.AbstractJdbc2Connection which adds the jdbc2
* methods. The real Connection class (for jdbc1) is org.postgresql.jdbc1.Jdbc1Connection
@@ -475,6 +475,10 @@ public abstract class AbstractJdbc1Connection implements org.postgresql.PGConnec
*/
public java.sql.ResultSet ExecSQL(String sql, java.sql.Statement stat) throws SQLException
{
+ if (isClosed())
+ {
+ throw new PSQLException("postgresql.con.closed");
+ }
return new QueryExecutor(new String[] {sql}, EMPTY_OBJECT_ARRAY, stat, pg_stream, (java.sql.Connection)this).execute();
}
private static final Object[] EMPTY_OBJECT_ARRAY = new Object[0];
@@ -494,6 +498,10 @@ public abstract class AbstractJdbc1Connection implements org.postgresql.PGConnec
*/
public java.sql.ResultSet ExecSQL(String[] p_sqlFragments, Object[] p_binds, java.sql.Statement stat) throws SQLException
{
+ if (isClosed())
+ {
+ throw new PSQLException("postgresql.con.closed");
+ }
return new QueryExecutor(p_sqlFragments, p_binds, stat, pg_stream, (java.sql.Connection)this).execute();
}