Re: MySQL -- finding whether there's a transaction started

From: Date: Sun, 26 Apr 2009 22:40:40 +0000
Subject: Re: MySQL -- finding whether there's a transaction started
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-292005@lists.php.net to get a copy of this message
Bogdan Stancescu wrote:
On 24-Apr-09 03:45, Chris wrote:
I don't think mysql has any way of finding that out. If you're using an abstraction layer, it's easy enough in code - though rollback's are a little harder - should they do a complete rollback or just to a savepoint?
Thank you for taking the time to sketch that mock-up -- yes, we were also thinking about something similar as a last resort, but I just can't believe you can't simply ask MySQL whether it's going to autocommit the next query or not...
How can it know? What if a bad query comes through or a null value where there shouldn't be or a bad integer value or ... They are all situations where a transaction will be rolled back. -- Postgresql & php tutorials http://www.designmagick.com/

« previous php.general (#292005) next »