Bug #64055 [NoF->Csd]: nextRowset() returns false

From: Date: Sun, 22 Mar 2020 07:00:08 +0000
Subject: Bug #64055 [NoF->Csd]: nextRowset() returns false
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-226221@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=64055&edit=1

 ID:                 64055
 User updated by:    kenji dot uui at gmail dot com
 Reported by:        kenji dot uui at gmail dot com
 Summary:            nextRowset() returns false
-Status:             No Feedback
+Status:             Closed
 Type:               Bug
 Package:            PDO MySQL
 Operating System:   Ubuntu
 PHP Version:        5.3.21
 Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

I was not able to reproduce this bug with PHP 7.3 on Linux.


Previous Comments:
------------------------------------------------------------------------
[2020-03-22 04:22:09] 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 "Re-Opened". Thank you.

------------------------------------------------------------------------
[2020-03-13 15:32:31] cmb@php.net

I cannot reproduce this; I get 3 result sets (PHP-7.3 and PHP-7.4
on Windows with mysqlnd).  Does this fail for you with any of the
actively supported PHP versions[1]?

[1] <https://www.php.net/supported-versions.php>

------------------------------------------------------------------------
[2013-01-23 11:03:15] kenji dot uui at gmail dot com

Description:
------------
The below code expects 3 result sets, but only 2 returned.


Test script:
---------------
<?php

$db = new PDO('mysql:host=localhost;dbname=information_schema', 'root',
'');
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

$sql = <<<SQL
SELECT * FROM CHARACTER_SETS WHERE CHARACTER_SET_NAME = 'sjis';
SELECT * FROM CHARACTER_SETS WHERE CHARACTER_SET_NAME = 'utf8';
SELECT * FROM CHARACTER_SETS WHERE CHARACTER_SET_NAME = 'ujis';
SQL;
$result = $db->query($sql);
$i = 1;
do {
  echo "<br />";
  echo "Result set ", $i++, ":\n"; 
  print_r($result->fetchAll());
} while ($result->nextRowset());


Expected result:
----------------
Result set 1: Array ( [0] => Array ( [CHARACTER_SET_NAME] => sjis [0] => sjis
[DEFAULT_COLLATE_NAME] => sjis_japanese_ci [1] => sjis_japanese_ci [DESCRIPTION] =>
Shift-JIS Japanese [2] => Shift-JIS Japanese [MAXLEN] => 2 [3] => 2 ) )
Result set 2: Array ( [0] => Array ( [CHARACTER_SET_NAME] => utf8 [0] => utf8
[DEFAULT_COLLATE_NAME] => utf8_general_ci [1] => utf8_general_ci [DESCRIPTION] => UTF-8
Unicode [2] => UTF-8 Unicode [MAXLEN] => 3 [3] => 3 ) )
Result set 3: Array ( [0] => Array ( [CHARACTER_SET_NAME] => ujis [0] => ujis
[DEFAULT_COLLATE_NAME] => ujis_japanese_ci [1] => ujis_japanese_ci [DESCRIPTION] => EUC-JP
Japanese [2] => EUC-JP Japanese [MAXLEN] => 3 [3] => 3 ) ) 

Actual result:
--------------
Result set 1: Array ( [0] => Array ( [CHARACTER_SET_NAME] => sjis [0] => sjis
[DEFAULT_COLLATE_NAME] => sjis_japanese_ci [1] => sjis_japanese_ci [DESCRIPTION] =>
Shift-JIS Japanese [2] => Shift-JIS Japanese [MAXLEN] => 2 [3] => 2 ) )
Result set 2: Array ( [0] => Array ( [CHARACTER_SET_NAME] => utf8 [0] => utf8
[DEFAULT_COLLATE_NAME] => utf8_general_ci [1] => utf8_general_ci [DESCRIPTION] => UTF-8
Unicode [2] => UTF-8 Unicode [MAXLEN] => 3 [3] => 3 ) ) 


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=64055&edit=1


Thread (4 messages)

« previous php.bugs (#226221) next »