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

Bug #6313 MDB2 related fixes
Submitted: 2005-12-21 14:17 UTC
From: lsmith Assigned: lsmith
Status: Closed Package: DB_DataObject
PHP Version: Irrelevant OS: irrelevant
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 : 46 + 13 = ?

 
 [2005-12-21 14:17 UTC] lsmith
Description: ------------ Here are a number of MDB2 related fixes .. they are untested but should bring things inline with 2.0.0RC1 Test script: --------------- RCS file: /repository/pear/DB_DataObject/DataObject.php,v retrieving revision 1.390 diff -r1.390 DataObject.php 435c435 < /* theoretically MDB! */ --- > /* theoretically MDB2! */ 437,438c437,438 < $DB->setLimit($this->_query['limit_count'],$this->_query['limit_start']); < } --- > $DB->setLimit($this->_query['limit_count'],$this->_query['limit_start']); > } 1355c1355 < // MDB --- > // MDB2 1553c1553 < // mdb uses escape... --- > // MDB2 uses escape... 2051c2051 < * backend wrapper for quoting, as MDB and DB do it differently... --- > * backend wrapper for quoting, as MDB2 and DB do it differently... 2201c2201 < /* assumption is MDB */ --- > /* assumption is MDB2 */ 2205,2209c2205 < if ($db_options) { < $_DB_DATAOBJECT['CONNECTIONS'][$this->_database_dsn_md5] = MDB2::connect($dsn,$db_options); < } else { < $_DB_DATAOBJECT['CONNECTIONS'][$this->_database_dsn_md5] = MDB2::connect($dsn); < } --- > $_DB_DATAOBJECT['CONNECTIONS'][$this->_database_dsn_md5] = MDB2::connect($dsn,$db_options); 2315,2317d2310 < < $result = $DB->query($string); < 2319c2312,2325 < --- > if ($_DB_driver == 'DB') { > $result = $DB->query($string); > } else { > switch (strtolower(substr(trim($string),0,6))) { > case 'insert': > case 'update': > case 'delete': > $result = $DB->exec($string); > break; > default: > $result = $DB->query($string); > break; > } > } 2321c2327 < if (is_a($result,'DB_Error')) { --- > if (is_a($result,'PEAR_Error')) { 2356c2362 < if (is_a($this->N,'DB_Error')) { --- > if (is_a($this->N,'PEAR_Error')) {

Comments

 [2005-12-22 03:05 UTC] alan_k
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.
 [2005-12-22 13:46 UTC] lsmith
I presume you intentionally left out the fix to use "exec()" for DML statements? This change would be necessary to make things compatible with the current MDB2 version 2.0.0RC1.
 [2005-12-23 00:16 UTC] alan_k
Are you sure? http://cvs.php.net/viewcvs.cgi/pear/DB_DataObject/DataObject.php?r1=1.391&r2=1.392 ps. diff -u is a bit easier to read... ;)
 [2005-12-23 09:36 UTC] lsmith
Narf, I updated my local checkout and I must have been blind .. sorry :-( Could you then also update the dependency in the package.xml?