felipe                                   Thu, 29 Jul 2010 23:46:49 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=301707

Log:
- New test

Changed paths:
    A   php/php-src/branches/PHP_5_3/ext/pdo_sqlite/tests/bug52487.phpt
    A   php/php-src/trunk/ext/pdo_sqlite/tests/bug52487.phpt

Added: php/php-src/branches/PHP_5_3/ext/pdo_sqlite/tests/bug52487.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/pdo_sqlite/tests/bug52487.phpt             
                (rev 0)
+++ php/php-src/branches/PHP_5_3/ext/pdo_sqlite/tests/bug52487.phpt     
2010-07-29 23:46:49 UTC (rev 301707)
@@ -0,0 +1,21 @@
+--TEST--
+Bug #52487 (PDO::FETCH_INTO leaks memory)
+--SKIPIF--
+<?php # vim:ft=php
+if (!extension_loaded('pdo_sqlite')) print 'skip not loaded';
+?>
+--FILE--
+<?php
+require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
+$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');
+
+$stmt = $db->prepare("select 1 as attr");
+for ($i = 0; $i < 10; $i++) {
+       $stmt->setFetchMode(PDO::FETCH_INTO, new stdClass);
+}
+
+print "ok\n";
+
+?>
+--EXPECT--
+ok


Property changes on: 
php/php-src/branches/PHP_5_3/ext/pdo_sqlite/tests/bug52487.phpt
___________________________________________________________________
Added: svn:keywords
   + Id Rev Revision
Added: svn:eol-style
   + native

Added: php/php-src/trunk/ext/pdo_sqlite/tests/bug52487.phpt
===================================================================
--- php/php-src/trunk/ext/pdo_sqlite/tests/bug52487.phpt                        
        (rev 0)
+++ php/php-src/trunk/ext/pdo_sqlite/tests/bug52487.phpt        2010-07-29 
23:46:49 UTC (rev 301707)
@@ -0,0 +1,21 @@
+--TEST--
+Bug #52487 (PDO::FETCH_INTO leaks memory)
+--SKIPIF--
+<?php # vim:ft=php
+if (!extension_loaded('pdo_sqlite')) print 'skip not loaded';
+?>
+--FILE--
+<?php
+require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
+$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');
+
+$stmt = $db->prepare("select 1 as attr");
+for ($i = 0; $i < 10; $i++) {
+       $stmt->setFetchMode(PDO::FETCH_INTO, new stdClass);
+}
+
+print "ok\n";
+
+?>
+--EXPECT--
+ok


Property changes on: php/php-src/trunk/ext/pdo_sqlite/tests/bug52487.phpt
___________________________________________________________________
Added: svn:keywords
   + Id Rev Revision
Added: svn:eol-style
   + native

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to