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:             Open
+Status:             Verified
 Type:               Bug
 Package:            MySQLi related
 Operating System:   All
 PHP Version:        5.3Git-2012-05-16 (Git)
-Assigned To:        
+Assigned To:        mysql
 Block user comment: N
 Private report:     N



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

Reply via email to