Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0b4

Bug #10105 inTransaction() does not work as documented
Submitted: 2007-02-15 02:00 UTC
From: elanthis at awesomeplay dot com Assigned: quipo
Status: Closed Package: MDB2_Driver_mysqli (version 1.3.0)
PHP Version: 5.2.1 OS: linux
Roadmaps: (Not assigned)    
Subscription  


 [2007-02-15 02:00 UTC] elanthis at awesomeplay dot com (Sean)
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

Comments

 [2007-02-16 17:09 UTC] quipo (Lorenzo Alberton)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.