bug71049.phpt 461 B

1234567891011121314151617181920
  1. --TEST--
  2. Bug #71049 (SQLite3Stmt::execute() releases bound parameter instead of internal buffer)
  3. --EXTENSIONS--
  4. sqlite3
  5. --FILE--
  6. <?php
  7. require(__DIR__ . '/new_db.inc');
  8. $db->exec('CREATE TABLE test (age INTEGER, id STRING)');
  9. $stmt = $db->prepare("SELECT * FROM test WHERE id = ? ORDER BY id ASC");
  10. $foo = "alive" . chr(33);
  11. $stmt->bindParam(1, $foo, SQLITE3_BLOB);
  12. $results = $stmt->execute();
  13. var_dump($foo);
  14. $db->close();
  15. ?>
  16. --EXPECT--
  17. string(6) "alive!"