]> granicus.if.org Git - php/commitdiff
@- Uncommitted outstanding OCI8 transactions are now rolled back
authorThies C. Arntzen <thies@php.net>
Thu, 25 May 2000 07:44:45 +0000 (07:44 +0000)
committerThies C. Arntzen <thies@php.net>
Thu, 25 May 2000 07:44:45 +0000 (07:44 +0000)
@  before the connection is closed. (Thies)

ext/oci8/oci8.c

index c7a078c31adf73182810c46bac5422ae8e8496c3..92d0c575161cef7399fda5751f50a69db691bb6c 100644 (file)
@@ -654,12 +654,14 @@ _oci_conn_list_dtor(oci_connection *connection)
        }
 
        if (connection->pServiceContext) {
-               /*
-               connection->error = 
-                       OCITransCommit(connection->pServiceContext,
-                                                  connection->pError, 
-                                                  (ub4)0);
-               */
+               connection->error =
+                       OCITransRollback(connection->pServiceContext,
+                                                        connection->pError,
+                                                        (ub4)0);
+               if (connection->error) {
+                       oci_error(connection->pError, "failed to rollback outstanding transactions!", connection->error);
+               }
 
                OCIHandleFree((dvoid *) connection->pServiceContext, (ub4) OCI_HTYPE_SVCCTX);
        }