Re: mysqli auto rollback on script termination

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Martin Koch Andersen wrote:
Chris skrev:
It should be rolled back when a connection is lost or a transaction isn't explicitly committed.

Can you find documentation on this specific issue anywhere?

I think the same as you, but I find it odd, it is not documented.

Reason I'm asking is, I've seen some deadlock issues in a script (using FOR UPDATE and LOCK IN SHARE MODE), that looks like they are caused by transactions not being rolled back (releasing locks) correctly.

This suggests they should be released:
http://dev.mysql.com/doc/refman/4.1/en/innodb-locking-reads.html

Locks set by IN SHARE MODE and FOR UPDATE reads are released when the transaction is committed or rolled back.


It doesn't explicitly say anything about when a connection is lost but I'm guessing it would rollback the transaction (well I'd sure hope so).

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux