From ff53dde157e8a7810e1fab2257ce8b1c2edf74e5 Mon Sep 17 00:00:00 2001 From: "Thies C. Arntzen" Date: Thu, 25 May 2000 07:44:45 +0000 Subject: [PATCH] @- Uncommitted outstanding OCI8 transactions are now rolled back @ before the connection is closed. (Thies) --- ext/oci8/oci8.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index c7a078c31ad..92d0c575161 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -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); }