|
From: Sean C. <se...@ch...> - 2002-10-22 17:13:25
|
> Modified Files:
> Pg.rb
> Log Message:
> reverted to old transaction handling schema; removed usage of SET AUTOCOMMIT TO ON|OFF.
Thank you.
> @@ -109,8 +113,8 @@
> # DBD Protocol -----------------------------------------------
>
> def disconnect
> - unless @attr['AutoCommit']
> - @connection.exec("ROLLBACK") # rollback outstanding transactions
> + if not @attr['AutoCommit'] and @in_transaction
> + @connection.exec("COMMIT") # commit outstanding transactions
> end
> @connection.close
> end
This is really troublesome. If you're in a transaction when you
disconnect, and haven't explicitly committed, then I think you should
rollback. This is what every other DB lib does, including psql. -sc
--
Sean Chittenden
|