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