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

Bug #10473 With fbsql, when calling commit or rollback, the connection is not passed-on
Submitted: 2007-03-23 18:14 UTC
From: rossnick Assigned: aharvey
Status: Closed Package: DB (version 1.7.10)
PHP Version: 5.2.1 OS: any
Roadmaps: 1.7.11    
Subscription  


 [2007-03-23 18:14 UTC] rossnick (Nicolas Ross)
Description: ------------ In DB/fbsql.php, when dbh->commit() OR dbh->rollback() is called, fbsql_commit (or fbsql_rollback) is called without any parameter. When using a single connection, there is no problem with this. But, when 2 connections are active, there is no telling on wich one the commit or rollback is done. Typicly, it'll be done on the last one used, but that's rather inconviniant... Test script: --------------- The solution : *** DB/fbsql.php.orig 2007-03-23 15:03:13.000000000 -0400 --- DB/fbsql.php 2007-03-23 15:03:19.000000000 -0400 *************** *** 353,359 **** */ function commit() { ! @fbsql_commit(); } // }}} --- 353,359 ---- */ function commit() { ! @fbsql_commit($this->connection); } // }}} *************** *** 366,372 **** */ function rollback() { ! @fbsql_rollback(); } // }}} --- 366,372 ---- */ function rollback() { ! @fbsql_rollback($this->connection); } // }}} Expected result: ---------------- Commit on the good connection Actual result: -------------- Commit on the wrong connection

Comments

 [2007-03-26 17:38 UTC] aharvey (Adam Harvey)
Patch looks good to me; leaving open until I have a chance to test it fully later this week.
 [2007-03-28 07:04 UTC] aharvey (Adam Harvey)
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at http://pear.php.net/get/DB Thanks for the patch, Nicolas; it was applied as-is.