MySQL -- finding whether there's a transaction started
| From: | Bogdan Stancescu | Date: | Thu, 23 Apr 2009 13:10:50 +0000 |
| Subject: | MySQL -- finding whether there's a transaction started | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-291861@lists.php.net to get a copy of this message | ||
Hello list,
I'm developing a library and would need to know if the code calling my
library has already started a MySQL transaction or not. I want to know
whether I should start one or use savepoints instead -- starting a
transaction if one is already in progress commits the existing
transaction, and setting a savepoint silently fails outside
transactions. And I was unable to find any non-destructive way of
retrieving that information -- is there any?
Thank you,
Bogdan