mirror of
https://github.com/postgres/postgres.git
synced 2025-08-31 17:02:12 +03:00
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
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user