bindto). (Ilia)
- Fixed bug #48132 (configure check for curl ssl support fails with
--disable-rpath). (Jani)
+- Fixed bug #48070 (PDO_OCI: Segfault when using persistent connection).
+ (Pierre, Matteo)
- Fixed bug #48058 (Year formatter goes wrong with out-of-int range). (Derick)
- Fixed bug #48038 (odbc_execute changes variables used to form params array).
(Felipe)
S = (pdo_oci_stmt*)stmt->driver_data;
einfo = &S->einfo;
pdo_err = &stmt->error_code;
- if (einfo->errmsg) {
- efree(einfo->errmsg);
- }
}
else {
einfo = &H->einfo;
- if (einfo->errmsg) {
- pefree(einfo->errmsg, dbh->is_persistent);
- }
+ }
+
+ if (einfo->errmsg) {
+ pefree(einfo->errmsg, dbh->is_persistent);
}
einfo->errmsg = NULL;
--- /dev/null
+--TEST--
+PDO OCI Bug #44301 (Segfault when an exception is thrown on persistent connections)
+--SKIPIF--
+<?php
+if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded');
+require dirname(__FILE__).'/../../pdo/tests/pdo_test.inc';
+PDOTest::skip();
+?>
+--FILE--
+<?php
+putenv("PDO_OCI_TEST_ATTR=" . serialize(array(PDO::ATTR_PERSISTENT => true)));
+require 'ext/pdo/tests/pdo_test.inc';
+$db = PDOTest::test_factory('ext/pdo_oci/tests/common.phpt');
+$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+
+try {
+ $stmt = $db->prepare('SELECT * FROM no_table');
+ $stmt->execute();
+} catch (PDOException $e) {
+ print $e->getMessage();
+}
+$db = null;
+--EXPECTF--
+SQLSTATE[HY000]: General error: 942 OCIStmtExecute: ORA-00942: table or view does not exist
+ (%s/ext/pdo_oci/oci_statement.c:%d)