Skip to content

Commit fcbf1f1

Browse files
author
Barry Lind
committed
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
1 parent 88381ad commit fcbf1f1

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/interfaces/jdbc/org/postgresql/core/BaseStatement.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Copyright (c) 2003, PostgreSQL Global Development Group
77
*
88
* IDENTIFICATION
9-
* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/core/Attic/BaseStatement.java,v 1.3 2003/05/07 03:03:30 barry Exp $
9+
* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/core/Attic/BaseStatement.java,v 1.4 2003/08/11 20:54:55 barry Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -29,9 +29,11 @@ public interface BaseStatement extends org.postgresql.PGStatement
2929
* excess rows are silently dropped.
3030
*/
3131
public void addWarning(String p_warning) throws SQLException;
32+
public void close() throws SQLException;
3233
public int getFetchSize() throws SQLException;
3334
public int getMaxRows() throws SQLException;
3435
public int getResultSetConcurrency() throws SQLException;
3536
public String getStatementName();
37+
public SQLWarning getWarnings() throws SQLException;
3638

3739
}

src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Copyright (c) 2003, PostgreSQL Global Development Group
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1Connection.java,v 1.21 2003/06/30 21:10:55 davec Exp $
12+
* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1Connection.java,v 1.22 2003/08/11 20:54:55 barry Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -1345,16 +1345,18 @@ public int getTransactionIsolation() throws SQLException
13451345
}
13461346
rs.close();
13471347
} else {
1348-
clearWarnings();
1349-
execSQL(sql);
1350-
SQLWarning warning = getWarnings();
1348+
BaseResultSet l_rs = execSQL(sql);
1349+
BaseStatement l_stat = l_rs.getPGStatement();
1350+
SQLWarning warning = l_stat.getWarnings();
13511351
if (warning != null)
13521352
{
13531353
level = warning.getMessage();
13541354
}
1355-
clearWarnings();
1355+
l_rs.close();
1356+
l_stat.close();
13561357
}
13571358
if (level != null) {
1359+
level = level.toUpperCase();
13581360
if (level.indexOf("READ COMMITTED") != -1)
13591361
return Connection.TRANSACTION_READ_COMMITTED;
13601362
else if (level.indexOf("READ UNCOMMITTED") != -1)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy