php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62046 mysqli@mysqlnd can't iterate over stored sets after call to mysqli_stmt_reset()
Submitted: 2012-05-16 12:14 UTC Modified: 2012-05-16 23:10 UTC
From: andrey@php.net Assigned: mysql (profile)
Status: Closed Package: MySQLi related
PHP Version: 5.3Git-2012-05-16 (Git) OS: All
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: andrey@php.net
New email:
PHP Version: OS:

 

 [2012-05-16 12:14 UTC] andrey@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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-05-16 12:14 UTC] andrey@php.net
-Status: Open +Status: Verified -Assigned To: +Assigned To: mysql
 [2012-05-16 23:10 UTC] andrey@php.net
-Status: Verified +Status: Closed
 [2012-05-16 23:10 UTC] andrey@php.net
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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Nov 25 07:01:31 2024 UTC