From 0433431188b9e71841ae292cb218ca89ded58b87 Mon Sep 17 00:00:00 2001 From: Aaron Krebs Date: Wed, 11 Dec 2013 12:32:23 -0700 Subject: Make oci_execute() calls inside num_rows() non-committing. Fixes #696. Fixes bug in Oracle driver. Calls to oci_execute() inside num_rows() of the Oracle driver can be made non-committing to fix bug with transactions. Since calls to oci_execute are only there to reset which row is next in line for oci_fetch() calls, it's fine to not commit. --- system/database/drivers/oci8/oci8_result.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/database/drivers/oci8/oci8_result.php b/system/database/drivers/oci8/oci8_result.php index 3421278a5..f6138c014 100644 --- a/system/database/drivers/oci8/oci8_result.php +++ b/system/database/drivers/oci8/oci8_result.php @@ -43,11 +43,11 @@ class CI_DB_oci8_result extends CI_DB_result { if ($this->num_rows === 0 && count($this->result_array()) > 0) { $this->num_rows = count($this->result_array()); - @oci_execute($this->stmt_id); + @oci_execute($this->stmt_id, OCI_DEFAULT); if ($this->curs_id) { - @oci_execute($this->curs_id); + @oci_execute($this->curs_id, OCI_DEFAULT); } } -- cgit v1.2.3-24-g4f1b