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

Bug #4672 Commit always returning true
Submitted: 2005-06-24 07:36 UTC
From: rofranco at c17 dot net Assigned: alan_k
Status: Closed Package: DB_DataObject
PHP Version: 4.3.11 OS: Linux
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 17 - 9 = ?

 
 [2005-06-24 07:36 UTC] rofranco at c17 dot net
Description: ------------ We are using the "DEFERRABLE" and "INITIALY DEFERRED" options in our PostgreSQL database, and found that sometimes there can be an error during COMMIT. Therefore, we've made 2 small changes to DataObject.php to be able to handle the return value of the commit function. I'm copying the patch file in case you consider it worth including in DataObject.php Reproduce code: --------------- --- DataObject.php 2005-06-24 09:20:03.139954064 +0200 +++ DataObject.php2 2005-06-24 09:25:12.923859752 +0200 @@ -2209,11 +2209,11 @@ return true; } if (strtoupper($string) == 'COMMIT') { - $DB->commit(); + $res = $DB->commit(); if ($_DB_driver == 'DB') { $DB->autoCommit(true); } - return true; + return $res; } if (strtoupper($string) == 'ROLLBACK') { Expected result: ---------------- Returning this value, we are able to determine if the transaction was successfull or not, and act accordingly.

Comments

 [2005-06-25 03:41 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!