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

Bug #13581 beginTransaction() issue wrong query.
Submitted: 2008-04-04 07:04 UTC
From: sunaoka Assigned: quipo
Status: Closed Package: MDB2_Driver_mysql (version 1.4.1)
PHP Version: 5.2.5 OS:
Roadmaps: (Not assigned)    

 [2008-04-04 07:04 UTC] sunaoka (Norifumi Sunaoka)
Description: ------------ beginTransaction() issue wrong query. see: Test script: --------------- $db =& MDB2::factory('mysql://username:password@localhost/test'); $db->beginTransaction(); echo $db->last_query; Expected result: ---------------- SET AUTOCOMMIT = 0 Actual result: -------------- SET AUTOCOMMIT = 1


 [2008-04-07 20:43 UTC] brotherli (Thomas Bruederli)
I had the same problem with the 1.4.1 version. Finally I found the problem in _getServerCapabilities() where the capabilities are only checked once (static $already_checked is set to true). When creating a second instance using MDB2::connect(), this new object does never enter the if-block on line 751. Changing static $already_checked to $this->already_checked solved the problem for me.
 [2008-04-07 22:03 UTC] quipo (Lorenzo Alberton)
@Norifumi: you're right, thanks for noticing. Fixed in CVS. @Thomas: that's another issue, it was fixed in the latest release. Please upgrade.