]> granicus.if.org Git - php/commitdiff
revert stmt release on connection error change (and sync with PHP 6)
authorChristopher Jones <sixd@php.net>
Tue, 25 Mar 2008 17:38:07 +0000 (17:38 +0000)
committerChristopher Jones <sixd@php.net>
Tue, 25 Mar 2008 17:38:07 +0000 (17:38 +0000)
ext/oci8/oci8_statement.c

index f57ecce8b9678a4e9f17ead966aa907443d9e6fb..b0929c8989e01e80e59c99405a6c19a248ee7a52 100644 (file)
@@ -82,7 +82,7 @@ php_oci_statement *php_oci_statement_create (php_oci_connection *connection, cha
                        connection->errcode = php_oci_error(connection->err, connection->errcode TSRMLS_CC);
 
 #if HAVE_OCI_STMT_PREPARE2
-                       PHP_OCI_CALL(OCIStmtRelease, (statement->stmt, statement->err, NULL, 0, OCI_STRLS_CACHE_DELETE));
+                       PHP_OCI_CALL(OCIStmtRelease, (statement->stmt, statement->err, NULL, 0, statement->errcode ? OCI_STRLS_CACHE_DELETE : OCI_DEFAULT));
                        PHP_OCI_CALL(OCIHandleFree,(statement->err, OCI_HTYPE_ERROR));
 #else
                        PHP_OCI_CALL(OCIHandleFree,(statement->stmt, OCI_HTYPE_STMT));