Re: failing to rollback before a client exits.
Posted in 2004
Andrew Hardy wrote: > I have an application which manages various sql updates in their begin, > commit transactions. > > On an occasion the code hits a bug where it does a begin, carries out a > number of sql updates successfully, then decides it needs to rollback, but > does NOT. The program then exits cleanly. As Art said, the engine rolls back any incomplete transaction when the server detects that a client has disconnected without committing its changes. When you say "the program exits cleanly', does that mean it does an explicit disconnect? If you have a TX open, the disconnect would fail. If you don't disconnect explicitly, the implicit disconnect automatically triggers a rollback on outstanding transactions. (Oracle, to name one other system, seems to do an implicit commit if an application disconnects but terminates without an error - if I understand the information from Tim Bunce, the devloper of DBI and DBD::Oracle, correctly.) > Can any one tell me if the updates may under any circumstances be commited > ? There aren't supposed to be any. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/