php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62803 nextRowset not returning false
Submitted: 2012-08-12 16:06 UTC Modified: 2013-02-18 00:35 UTC
Votes:3
Avg. Score:4.3 ± 0.5
Reproduced:3 of 3 (100.0%)
Same Version:1 (33.3%)
Same OS:1 (33.3%)
From: jackspr at hotmail dot com Assigned:
Status: No Feedback Package: PDO related
PHP Version: 5.3.15 OS: Windows Server 2008
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
24 - 4 = ?
Subscribe to this entry?

 
 [2012-08-12 16:06 UTC] jackspr at hotmail dot com
Description:
------------
---
From manual page: http://www.php.net/pdostatement.nextrowset#refsect1-
pdostatement.nextrowset-seealso
---
nextRowset is not returning false. The code below causes an exception in the 
fetchAll line because it is trying to access a result set does not exist.

$r=0
$qy = "CALL getAllInfo()";
$istmt = $con->prepare($qy);
if ($istmt->execute())
{
	$outcome = self::SUCCESS;
	do 
	{				
          $result[$r] = $istmt->fetchAll(PDO::FETCH_ASSOC);
          $r++;
	}
	while($istmt->nextRowset());
}

Test script:
---------------
$r=0
$qy = "CALL getAllInfo()";
$istmt = $con->prepare($qy);
if ($istmt->execute())
{
	$outcome = self::SUCCESS;
	do 
	{				
          $result[$r] = $istmt->fetchAll(PDO::FETCH_ASSOC);
          $r++;
	}
	while($istmt->nextRowset());
}

Expected result:
----------------
Clean exit with all possible resultsets in the result array.

Actual result:
--------------
exception 'PDOException' with message 'SQLSTATE[HY000]: General error'

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-08-12 16:09 UTC] jackspr at hotmail dot com
-: jspringer at telebarbados dot com +: jackspr at hotmail dot com
 [2012-08-12 16:09 UTC] jackspr at hotmail dot com
update
 [2012-09-13 04:01 UTC] ssufficool@php.net
-Status: Open +Status: Feedback
 [2012-09-13 04:01 UTC] ssufficool@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


Which PDO driver are you using? I.e. MySQL, MSSQL, DBLIB, PGSQL
 [2012-09-13 16:08 UTC] nikic@php.net
@ssufficool: Probably this is the same bug as https://bugs.php.net/bug.php?id=62820, which is a mysqlnd issue.
 [2013-02-18 00:35 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
 [2013-05-20 09:42 UTC] ataymail at gmail dot com
I have exactly the same problem, but I have 2 almost identical apache servers 
and it works good on one, but on the other - it doesn't.

System:
Windows 7 Business Edition Service Pack 1 i586

Working one (Zend Studio Server):
Apache/2.2.22 (Win32) mod_ssl/2.2.22 OpenSSL/0.9.8x
PHP Version	5.3.21
Client API version	mysqlnd 5.0.8-dev - 20102224 - $Id: 
65fe78e70ce53d27a6cd578597722950e490b0d0 $

Non-working one (VertrigoServ):
Apache/2.2.23 (Win32) PHP/5.3.18
Client API version	mysqlnd 5.0.8-dev - 20102224 - $Id: 
65fe78e70ce53d27a6cd578597722950e490b0d0 $


Non-working one (EasyPHP):
Apache/2.4.4 (Win32) PHP/5.4.14
Client API version	mysqlnd 5.0.10 - 20111026 - $Id: 
e707c415db32080b3752b232487a435ee0372157 $

Does anybody has idea why it works only with Zend Studio Server and doesn't with 
another LAMPs?
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 05 10:01:31 2024 UTC