Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 44a6959

Browse files
author
Barry Lind
committed
Applied patch to work around server bug.
Modified Files: jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java
1 parent c085c77 commit 44a6959

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 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.17 2003/03/07 18:39:43 barry Exp $
12+
* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1Connection.java,v 1.18 2003/03/19 04:06:20 barry Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -892,7 +892,11 @@ public void setAutoCommit(boolean autoCommit) throws SQLException
892892
//We do the select to ensure a transaction is in process
893893
//before we do the commit to avoid warning messages
894894
//from issuing a commit without a transaction in process
895-
execSQL("select 1; commit; set autocommit = on;");
895+
//NOTE this is done in two network roundtrips to work around
896+
//a server bug in 7.3 where the select wouldn't actually start
897+
//a new transaction if in the same command as the commit
898+
execSQL("select 1;");
899+
execSQL("commit; set autocommit = on;");
896900
}
897901
else
898902
{

0 commit comments

Comments
 (0)