xref: /PHP-8.2/ext/pdo_dblib/tests/bug_50755.phpt (revision d6a0b3af)
1--TEST--
2PDO_DBLIB: Out of memory on large recordsets
3--EXTENSIONS--
4pdo_dblib
5--SKIPIF--
6<?php
7if (getenv('SKIP_REPEAT')) die('skip May fail on repeat');
8require __DIR__ . '/config.inc';
9getDbConnection();
10?>
11--CONFLICTS--
12all
13--FILE--
14<?php
15require __DIR__ . '/config.inc';
16
17$db = getDbConnection();
18
19/* This should be sufficient to overflow any buffers */
20$stmt = $db->prepare("select *
21from information_schema.columns ic1
22cross join information_schema.columns ic2
23cross join information_schema.columns ic3");
24
25$x = $stmt->execute();
26$n = 0;
27while (($r = $stmt->fetch())) {
28    $n++;
29}
30$stmt = null;
31
32echo "OK\n";
33
34?>
35--EXPECT--
36OK
37