following: select 1; commit; set autocommit true;
If this is submitted in one call to the server (the select 1 doesn't start a
new transaction like it should), however if the select 1 is sent as a separate
call then it works correctly.
Modified Files:
Tag: REL7_3_STABLE
jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java
//We do the select to ensure a transaction is in process
//before we do the commit to avoid warning messages
//from issuing a commit without a transaction in process
- ExecSQL("select 1; commit; set autocommit = on;");
+ //NOTE this is done in two network roundtrips to work around
+ //a server bug in 7.3 where the select wouldn't actually start
+ //a new transaction if in the same command as the commit
+ ExecSQL("select 1;");
+ ExecSQL("commit; set autocommit = on;");
}
else
{