Req #57037 [Opn->Csd]: Need a way to read current transaction state
| From: | cmb@php.net | Date: | Tue, 07 Apr 2015 18:50:56 +0000 |
| Subject: | Req #57037 [Opn->Csd]: Need a way to read current transaction state | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-191886@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=57037&edit=1
ID: 57037
Updated by: cmb@php.net
Reported by: hans at velum dot net
Summary: Need a way to read current transaction state
-Status: Open
+Status: Closed
Type: Feature/Change Request
-Package: PDO
+Package: *General Issues
Operating System: n/a
PHP Version: 5.1.0
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at
http://www.php.net/downloads.php
As of PHP 5.3.3 PDO::inTransaction() is available.
Previous Comments:
------------------------------------------------------------------------
[2007-12-14 14:55:25] hans at velum dot net
Re: Phil's comment.
Yes, that is currently what we (Propel) are doing; however, I would argue that this is something
that belongs in the core functionality.
Subclassing works great when only your project needs to use the PDO object; however, when you want
to build code that inter-operates with other libraries you run into trouble. For example, if you
want to use a PDO connection created by Zend_DB in Propel, you're out of luck because Propel
requires PropelPDO.
At least making this exception suppressable by config option would go a huge way to making PDO
usable in a framework context.
------------------------------------------------------------------------
[2007-12-06 18:27:27] phil at webstarsltd dot com
Isn't this exactly the kind of situation object extension is meant for?
Until such time as PDO offers this natively you could use a sub-class that exposes a method
inTransaction(), then override the transaction methods to update this value, then calling the parent
to actually carry out the function.
Am I missing something here (like horrendous performance penalty by sub-classing built-in PHP
objects)?
------------------------------------------------------------------------
[2007-10-24 19:52:15] wez@php.net
Please stop spamming the ticket; updating it over and over again isn't going to make it happen
any faster.
------------------------------------------------------------------------
[2007-10-24 19:02:20] weinberg dot jon at gmail dot com
+1, this would be very nice to have.
------------------------------------------------------------------------
[2007-10-24 18:34:40] devzie at gmail dot com
+1 we need this feature too
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=57037
--
Edit this bug report at https://bugs.php.net/bug.php?id=57037&edit=1