bug44301.phpt 755 B

12345678910111213141516171819202122232425262728
  1. --TEST--
  2. PDO OCI Bug #44301 (Segfault when an exception is thrown on persistent connections)
  3. --EXTENSIONS--
  4. pdo
  5. pdo_oci
  6. --SKIPIF--
  7. <?php
  8. require __DIR__.'/../../pdo/tests/pdo_test.inc';
  9. PDOTest::skip();
  10. ?>
  11. --FILE--
  12. <?php
  13. putenv("PDO_OCI_TEST_ATTR=" . serialize(array(PDO::ATTR_PERSISTENT => true)));
  14. require 'ext/pdo/tests/pdo_test.inc';
  15. $db = PDOTest::test_factory('ext/pdo_oci/tests/common.phpt');
  16. $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  17. try {
  18. $stmt = $db->prepare('SELECT * FROM no_table');
  19. $stmt->execute();
  20. } catch (PDOException $e) {
  21. print $e->getMessage();
  22. }
  23. $db = null;
  24. ?>
  25. --EXPECTF--
  26. SQLSTATE[HY000]: General error: 942 OCIStmtExecute: ORA-00942: table or view does not exist
  27. (%s%epdo_oci%eoci_statement.c:%d)