bug_76488.phpt 645 B

1234567891011121314151617181920212223242526272829303132333435
  1. --TEST--
  2. PDO_Firebird: Bug #76488 Memory leak when fetching a BLOB field
  3. --EXTENSIONS--
  4. pdo_firebird
  5. --SKIPIF--
  6. <?php require('skipif.inc'); ?>
  7. --ENV--
  8. LSAN_OPTIONS=detect_leaks=0
  9. --FILE--
  10. <?php
  11. require 'testdb.inc';
  12. $sql = '
  13. with recursive r(n) as (
  14. select 1 from rdb$database
  15. union all
  16. select n+1 from r where n < 1000
  17. )
  18. select n,
  19. cast(lpad(\'A\', 8000, \'A\') as BLOB sub_type TEXT) as SRC
  20. from r
  21. ';
  22. for ($i = 0; $i < 10; $i++) {
  23. $sth = $dbh->prepare($sql);
  24. $sth->execute();
  25. $rows = $sth->fetchAll();
  26. unset($rows);
  27. unset($sth);
  28. }
  29. unset($dbh);
  30. echo "OK";
  31. ?>
  32. --EXPECT--
  33. OK