1--TEST-- 2PDO_DBLIB: Out of memory on large recordsets 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/* This should be sufficient to overflow any buffers */ 13$stmt = $db->prepare("select * 14from information_schema.columns ic1 15cross join information_schema.columns ic2 16cross join information_schema.columns ic3"); 17 18$x = $stmt->execute(); 19$n = 0; 20while (($r = $stmt->fetch())) { 21 $n++; 22} 23$stmt = null; 24 25echo "OK\n"; 26 27?> 28--EXPECT-- 29OK 30