svn: /pear/packages/MDB2/trunk/ MDB2/Driver/mysqli.php package_mysqli.php

From: Date: Sat, 26 Dec 2009 14:05:50 +0000
Subject: svn: /pear/packages/MDB2/trunk/ MDB2/Driver/mysqli.php package_mysqli.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-58365@lists.php.net to get a copy of this message
quipo Sat, 26 Dec 2009 14:05:50 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=292645 Log: result->free() now works on multiple result sets Changed paths: U pear/packages/MDB2/trunk/MDB2/Driver/mysqli.php U pear/packages/MDB2/trunk/package_mysqli.php Modified: pear/packages/MDB2/trunk/MDB2/Driver/mysqli.php =================================================================== --- pear/packages/MDB2/trunk/MDB2/Driver/mysqli.php 2009-12-26 14:03:41 UTC (rev 292644) +++ pear/packages/MDB2/trunk/MDB2/Driver/mysqli.php 2009-12-26 14:05:50 UTC (rev 292645) @@ -1518,13 +1518,16 @@ */ function free() { - if (is_object($this->result) && $this->db->connection) { - $free = @mysqli_free_result($this->result); - if ($free === false) { - return $this->db->raiseError(null, null, null, - 'Could not free result', __FUNCTION__); + do { + if (is_object($this->result) && $this->db->connection) { + $free = @mysqli_free_result($this->result); + if ($free === false) { + return $this->db->raiseError(null, null, null, + 'Could not free result', __FUNCTION__); + } } - } + } while ($this->result = $this->nextResult()); + $this->result = false; return MDB2_OK; } Modified: pear/packages/MDB2/trunk/package_mysqli.php =================================================================== --- pear/packages/MDB2/trunk/package_mysqli.php 2009-12-26 14:03:41 UTC (rev 292644) +++ pear/packages/MDB2/trunk/package_mysqli.php 2009-12-26 14:05:50 UTC (rev 292645) @@ -8,6 +8,7 @@ $notes = <<<EOT - fixed bug #16003: incorrect check for error after mysqli_store_result - fixed bug #16147: first prepared statement is emulated when using factory with mysql +- result->free() now works on multiple result sets open todo items: - use a trigger to emulate setting default now()

« previous php.pear.cvs (#58365) next »