Edit report at https://bugs.php.net/bug.php?id=62046&edit=1
ID: 62046 Updated by: and...@php.net Reported by: and...@php.net Summary: mysqli@mysqlnd can't iterate over stored sets after call to mysqli_stmt_reset() -Status: Verified +Status: Closed Type: Bug Package: MySQLi related Operating System: All PHP Version: 5.3Git-2012-05-16 (Git) Assigned To: mysql Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2012-05-16 12:14:15] and...@php.net Description: ------------ mysqlnd's implementation of stmt_reset() has a bug, that stored results sets exist but cannot be read if mysqli_stmt::reset() is called. After reset the data is unavailable. Test script: --------------- <?php $link = new mysqli_connect('127.0.0.1', 'root', 'root', 'test'); $s = $mysqli->prepare('SELECT 42'); $s->execute(); $s->store_result(); $one = NULL; $s->bind_result($one); $s->reset(); while ($s->fetch()) { var_dump($one); } $s->close(); $c->close(); ?> Expected result: ---------------- int(42) Actual result: -------------- nothing ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=62046&edit=1