From:             
Operating system: All
PHP version:      5.3Git-2012-05-16 (Git)
Package:          MySQLi related
Bug Type:         Bug
Bug description:mysqli@mysqlnd can't iterate over stored sets after call to 
mysqli_stmt_reset()

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 bug report at https://bugs.php.net/bug.php?id=62046&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=62046&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=62046&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=62046&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=62046&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=62046&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=62046&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=62046&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=62046&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=62046&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=62046&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=62046&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=62046&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=62046&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=62046&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=62046&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=62046&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=62046&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=62046&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=62046&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=62046&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=62046&r=mysqlcfg

Reply via email to