Home » Database » MDB2_Driver_mysqli » Bug #10105
inTransaction() does not work as documented
Details
| Submitted | 2007-02-15 02:00 UTC |
|---|---|
| From | elanthis at awesomeplay dot com |
| Assigned | quipo |
| Status | Closed |
| Package | MDB2_Driver_mysqli |
| PHP Version | 5.2.1 |
| OS | linux |
| Roadmaps | (Not assigned) |
Comments
[2007-02-15 02:00 UTC] elanthis at awesomeplay dot com
Description:
------------
According to the documentation, the inTransaction() method should return true if any transaction is open. However, for the mysqli driver (and also the mysql driver), the inTransaction() method will always return false even if a transaction is open. It will return the number of transactions if nested transactions are in use, however. And yes, I have verified that transactions are actually working. Just not the inTransaction() method.
Test script:
---------------
$db = MDB2::factory(...);
echo "Transactions: {$db->supports('transactions')}<br>";
$db->beginTransaction();
echo "In transaction: {$db->inTransaction()}<br>";
Expected result:
----------------
Transactions: 1
In transaction: 1
Actual result:
--------------
Transactions: 1
In transaction: 0