php-src/ext/pdo_dblib/tests/bug_50755.phpt

30 lines
565 B
Plaintext
Raw Normal View History

2010-06-29 06:04:17 +00:00
--TEST--
PDO_DBLIB: Out of memory on large recordsets
--SKIPIF--
<?php
2010-06-29 14:08:22 +00:00
if (!extension_loaded('pdo_dblib')) die('skip not loaded');
2010-06-29 06:04:17 +00:00
require dirname(__FILE__) . '/config.inc';
?>
--FILE--
<?php
2010-06-29 14:08:22 +00:00
require dirname(__FILE__) . '/config.inc';
2010-06-29 06:04:17 +00:00
/* This should be sufficient to overflow any buffers */
$stmt = $db->prepare("select *
from information_schema.columns ic1
cross join information_schema.columns ic2
cross join information_schema.columns ic3");
$x = $stmt->execute();
$n = 0;
while (($r = $stmt->fetch())) {
$n++;
}
$stmt = null;
echo "OK\n";
?>
--EXPECT--
OK