diff options
author | Barry Lind <barry@xythos.com> | 2003-08-11 20:54:55 +0000 |
---|---|---|
committer | Barry Lind <barry@xythos.com> | 2003-08-11 20:54:55 +0000 |
commit | fcbf1f1fdd628395c99ccd4e577a3942b5f86774 (patch) | |
tree | 284280d6d1cb1110bf80311111d4bf8868de303c /src | |
parent | 88381ade63de931c84f53dc873c986d40b8c8b61 (diff) | |
download | postgresql-fcbf1f1fdd628395c99ccd4e577a3942b5f86774.tar.gz postgresql-fcbf1f1fdd628395c99ccd4e577a3942b5f86774.zip |
Applied patch from Kim Ho to fix a regression against a 7.4 server. The result
of transaction isolation level changed from uppercase to lower case between 7.3 and 7.4. In testing, a regression was also fixed in this area when talking to
a 7.2 server due to changes in how notice messages are processed in the current
code.
Modified Files:
jdbc/build.xml jdbc/org/postgresql/core/BaseStatement.java
jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java
Diffstat (limited to 'src')
-rw-r--r-- | src/interfaces/jdbc/org/postgresql/core/BaseStatement.java | 4 | ||||
-rw-r--r-- | src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java | 12 |
2 files changed, 10 insertions, 6 deletions
diff --git a/src/interfaces/jdbc/org/postgresql/core/BaseStatement.java b/src/interfaces/jdbc/org/postgresql/core/BaseStatement.java index cf87cd199e5..5811eb1dab8 100644 --- a/src/interfaces/jdbc/org/postgresql/core/BaseStatement.java +++ b/src/interfaces/jdbc/org/postgresql/core/BaseStatement.java @@ -6,7 +6,7 @@ * Copyright (c) 2003, PostgreSQL Global Development Group * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/core/Attic/BaseStatement.java,v 1.3 2003/05/07 03:03:30 barry Exp $ + * $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/core/Attic/BaseStatement.java,v 1.4 2003/08/11 20:54:55 barry Exp $ * *------------------------------------------------------------------------- */ @@ -29,9 +29,11 @@ public interface BaseStatement extends org.postgresql.PGStatement * excess rows are silently dropped. */ public void addWarning(String p_warning) throws SQLException; + public void close() throws SQLException; public int getFetchSize() throws SQLException; public int getMaxRows() throws SQLException; public int getResultSetConcurrency() throws SQLException; public String getStatementName(); + public SQLWarning getWarnings() throws SQLException; } diff --git a/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java b/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java index cfb8e4e8975..1264c9f063e 100644 --- a/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java +++ b/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java @@ -9,7 +9,7 @@ * Copyright (c) 2003, PostgreSQL Global Development Group * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1Connection.java,v 1.21 2003/06/30 21:10:55 davec Exp $ + * $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1Connection.java,v 1.22 2003/08/11 20:54:55 barry Exp $ * *------------------------------------------------------------------------- */ @@ -1345,16 +1345,18 @@ public abstract class AbstractJdbc1Connection implements BaseConnection } rs.close(); } else { - clearWarnings(); - execSQL(sql); - SQLWarning warning = getWarnings(); + BaseResultSet l_rs = execSQL(sql); + BaseStatement l_stat = l_rs.getPGStatement(); + SQLWarning warning = l_stat.getWarnings(); if (warning != null) { level = warning.getMessage(); } - clearWarnings(); + l_rs.close(); + l_stat.close(); } if (level != null) { + level = level.toUpperCase(); if (level.indexOf("READ COMMITTED") != -1) return Connection.TRANSACTION_READ_COMMITTED; else if (level.indexOf("READ UNCOMMITTED") != -1) |