xref: /PHP-8.2/ext/pdo_dblib/tests/bug_67130.phpt (revision 74859783)
1--TEST--
2PDO_DBLIB: \PDOStatement::nextRowset() should succeed when all rows in current rowset haven't been fetched
3--EXTENSIONS--
4pdo_dblib
5--SKIPIF--
6<?php
7require __DIR__ . '/config.inc';
8?>
9--FILE--
10<?php
11require __DIR__ . '/config.inc';
12
13$stmt = $db->query('SELECT 1; SELECT 2; SELECT 3;');
14var_dump($stmt->fetch());
15var_dump($stmt->fetch());
16var_dump($stmt->nextRowset());
17var_dump($stmt->nextRowset());
18var_dump($stmt->fetch());
19var_dump($stmt->nextRowset());
20?>
21--EXPECT--
22array(2) {
23  ["computed"]=>
24  int(1)
25  [0]=>
26  int(1)
27}
28bool(false)
29bool(true)
30bool(true)
31array(2) {
32  ["computed"]=>
33  int(3)
34  [0]=>
35  int(3)
36}
37bool(false)
38