cvs: pear /MDB2 MDB2.php package.php
| From: | Lorenzo Alberton | Date: | Wed, 25 Apr 2007 09:14:03 +0000 |
| Subject: | cvs: pear /MDB2 MDB2.php package.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-46159@lists.php.net to get a copy of this message | ||
quipo Wed Apr 25 09:14:03 2007 UTC
Modified files:
/pear/MDB2 MDB2.php package.php
Log:
exec() now returns a reference instead of a copy to prevent memory leaks
http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2.php?r1=1.290&r2=1.291&diff_format=u
Index: pear/MDB2/MDB2.php
diff -u pear/MDB2/MDB2.php:1.290 pear/MDB2/MDB2.php:1.291
--- pear/MDB2/MDB2.php:1.290 Fri Apr 13 17:26:39 2007
+++ pear/MDB2/MDB2.php Wed Apr 25 09:14:03 2007
@@ -43,7 +43,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
-// $Id: MDB2.php,v 1.290 2007/04/13 17:26:39 davidc Exp $
+// $Id: MDB2.php,v 1.291 2007/04/25 09:14:03 quipo Exp $
//
/**
@@ -2451,7 +2451,7 @@
}
// }}}
- // {{{ function exec($query)
+ // {{{ function &exec($query)
/**
* Execute a manipulation query to the database and return the number of affected rows
@@ -2462,7 +2462,7 @@
*
* @access public
*/
- function exec($query)
+ function &exec($query)
{
$offset = $this->offset;
$limit = $this->limit;
@@ -2479,7 +2479,8 @@
return $result;
}
- return $this->_affectedRows($connection, $result);
+ $affectedRows = $this->_affectedRows($connection, $result);
+ return $affectedRows;
}
// }}}
@@ -4267,4 +4268,4 @@
}
// }}}
-?>
+?>
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/pear/MDB2/package.php?r1=1.251&r2=1.252&diff_format=u
Index: pear/MDB2/package.php
diff -u pear/MDB2/package.php:1.251 pear/MDB2/package.php:1.252
--- pear/MDB2/package.php:1.251 Tue Apr 3 20:55:35 2007
+++ pear/MDB2/package.php Wed Apr 25 09:14:03 2007
@@ -16,6 +16,7 @@
- fixed bug #10598: MDB2::singleton() not working in some rare conditions [fornax]
- in getTableIndexDefinition() and getTableConstraintDefinition() in the Reverse
module, also return the field position in the index/constraint
+- exec() now returns a reference instead of a copy to prevent memory leaks
open todo items:
- handle autoincrement fields in alterTable()