php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37392 Unnecessary call to OCITransRollback() at the end of request
Submitted: 2006-05-10 02:24 UTC Modified: 2006-05-10 10:08 UTC
From: cjbj at hotmail dot com Assigned:
Status: Closed Package: OCI8 related
PHP Version: 5.1.4 OS: n/a
Private report: No CVE-ID:
 [2006-05-10 02:24 UTC] cjbj at hotmail dot com
Description:
------------
Php_oci_persistent_helper() calls php_oci_connection_rollback() without checking connection->needs_commit. This results in an unnecessary call to OCITransRollback() at the end of request for persistent connections.

Reproduce code:
---------------
<?php
  echo "<pre>";
  oci_internal_debug(1);
  $conn = oci_pconnect("hr", "hr", "//localhost/XE");
  $query = 'select * from dual';
  $stid = oci_parse($conn, $query);
  oci_execute($stid, OCI_DEFAULT);
  oci_rollback($conn);
  echo "</pre>";
?>

Expected result:
----------------
...
OCI8 DEBUG: OCITransRollback at (/tmp/php-5.1.3/ext/oci8/oci8.c:1400) 
OCI8 DEBUG: OCIStmtRelease at (/tmp/php-5.1.3/ext/oci8/oci8_statement.c:589) 
...


Actual result:
--------------
...
OCI8 DEBUG: OCITransRollback at (/tmp/php-5.1.3/ext/oci8/oci8.c:1400) 
OCI8 DEBUG: OCITransRollback at (/tmp/php-5.1.3/ext/oci8/oci8.c:1400) 
OCI8 DEBUG: OCIStmtRelease at (/tmp/php-5.1.3/ext/oci8/oci8_statement.c:589) 
...


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-10 10:08 UTC] tony2001@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Thanks, Chris.
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Sun Apr 20 03:02:42 2014 UTC