Does this happen with latest PHP? If yes, please report this as a bug. PS: Current PostgreSQL module is trying to rollback uncommitted transactions when request is finished. This is old postgresql module issue, probably.
-- Yasuo Ohgaki Max Buvry wrote: > Hi, > > I use Postgresql 7.0 + php-4.0.2 and I meet a problem with the > transactions. > > The problem is the famous example of the bank accounts and the money > transfers. > My script php follows this steps : > > BEGIN WORK > UPDATE the first bank account > sleep(300) > UPDATE the second bank account > COMMIT WORK > > While the sleep, the client uses the STOP button on his browser and > stops the connection. > The first update is accepted : it seems that the transaction is > autocommited when the execution is stopped. > > I find a solution with php by using ignore_user_abort() and > connection_aborted(). But I should prefer an other method. > > For example anybody knows if it is possible to speficy the autocommit > to not when the connection is opened ? > > > In advance, thanks for your response. > > mb > > > ps : I test the same thing with Postgresql only and if the transaction > is not closed, the previous requests are "rollback" which is better for > me. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php