From fced25f5728ce81fe810216fcaa4ccec7523f6c9 Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Sat, 31 Dec 2016 08:46:18 -0800 Subject: Update copyright data to 2017 --- system/database/drivers/oci8/oci8_result.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/database/drivers/oci8/oci8_result.php') diff --git a/system/database/drivers/oci8/oci8_result.php b/system/database/drivers/oci8/oci8_result.php index fc860ea12..0c3543333 100644 --- a/system/database/drivers/oci8/oci8_result.php +++ b/system/database/drivers/oci8/oci8_result.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2016, British Columbia Institute of Technology + * Copyright (c) 2014 - 2017, British Columbia Institute of Technology * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.4.1 -- cgit v1.2.3-24-g4f1b From 208381009ed12768478b2e8110bfb6e506acc3e1 Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Tue, 9 Jan 2018 00:53:27 -0800 Subject: Annual copyright update --- system/database/drivers/oci8/oci8_result.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/database/drivers/oci8/oci8_result.php') diff --git a/system/database/drivers/oci8/oci8_result.php b/system/database/drivers/oci8/oci8_result.php index 0c3543333..1c4196f27 100644 --- a/system/database/drivers/oci8/oci8_result.php +++ b/system/database/drivers/oci8/oci8_result.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2017, British Columbia Institute of Technology + * Copyright (c) 2014 - 2018, British Columbia Institute of Technology * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2018, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.4.1 -- cgit v1.2.3-24-g4f1b From 52a87e506d4fc70bd5922b07a532852d28f28ab6 Mon Sep 17 00:00:00 2001 From: Mehdi Bounya Date: Thu, 17 May 2018 23:41:30 +0000 Subject: http:// to https:// --- system/database/drivers/oci8/oci8_result.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/database/drivers/oci8/oci8_result.php') diff --git a/system/database/drivers/oci8/oci8_result.php b/system/database/drivers/oci8/oci8_result.php index 1c4196f27..261a460f8 100644 --- a/system/database/drivers/oci8/oci8_result.php +++ b/system/database/drivers/oci8/oci8_result.php @@ -29,8 +29,8 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2018, British Columbia Institute of Technology (http://bcit.ca/) - * @license http://opensource.org/licenses/MIT MIT License + * @copyright Copyright (c) 2014 - 2018, British Columbia Institute of Technology (https://bcit.ca/) + * @license https://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.4.1 * @filesource -- cgit v1.2.3-24-g4f1b From 8bb638e392f5991c05ec9a1e57b882213844dc6f Mon Sep 17 00:00:00 2001 From: Jim Parry Date: Wed, 26 Dec 2018 21:03:09 -0800 Subject: Update copyright date to 2019 --- system/database/drivers/oci8/oci8_result.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/database/drivers/oci8/oci8_result.php') diff --git a/system/database/drivers/oci8/oci8_result.php b/system/database/drivers/oci8/oci8_result.php index 261a460f8..3da49aa76 100644 --- a/system/database/drivers/oci8/oci8_result.php +++ b/system/database/drivers/oci8/oci8_result.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2018, British Columbia Institute of Technology + * Copyright (c) 2014 - 2019, British Columbia Institute of Technology * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2018, British Columbia Institute of Technology (https://bcit.ca/) + * @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/) * @license https://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.4.1 -- cgit v1.2.3-24-g4f1b From 6ba0207160f8f2b99c79dd285bccf45f574ec660 Mon Sep 17 00:00:00 2001 From: sapics Date: Wed, 24 Jun 2020 11:51:36 +0900 Subject: Fix user guide url Replace from https://codeigniter.com/user_guide/* to https://codeigniter.com/userguide3/* --- system/database/drivers/oci8/oci8_result.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/database/drivers/oci8/oci8_result.php') diff --git a/system/database/drivers/oci8/oci8_result.php b/system/database/drivers/oci8/oci8_result.php index 3da49aa76..7fd911e82 100644 --- a/system/database/drivers/oci8/oci8_result.php +++ b/system/database/drivers/oci8/oci8_result.php @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author EllisLab Dev Team - * @link https://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/userguide3/database/ */ class CI_DB_oci8_result extends CI_DB_result { -- cgit v1.2.3-24-g4f1b From 4d545b6d05976b002829a8f75fe7054591c0b985 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 5 Jan 2022 19:49:11 +0200 Subject: [ci skip] Drop OCI8-specific get_cursor() and stored_procedure() methods --- system/database/drivers/oci8/oci8_result.php | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) (limited to 'system/database/drivers/oci8/oci8_result.php') diff --git a/system/database/drivers/oci8/oci8_result.php b/system/database/drivers/oci8/oci8_result.php index 7fd911e82..99d3d1067 100644 --- a/system/database/drivers/oci8/oci8_result.php +++ b/system/database/drivers/oci8/oci8_result.php @@ -55,13 +55,6 @@ class CI_DB_oci8_result extends CI_DB_result { */ public $stmt_id; - /** - * Cursor ID - * - * @var resource - */ - public $curs_id; - /** * Limit used flag * @@ -89,7 +82,6 @@ class CI_DB_oci8_result extends CI_DB_result { parent::__construct($driver_object); $this->stmt_id = $driver_object->stmt_id; - $this->curs_id = $driver_object->curs_id; $this->limit_used = $driver_object->limit_used; $this->commit_mode =& $driver_object->commit_mode; $driver_object->stmt_id = FALSE; @@ -173,12 +165,6 @@ class CI_DB_oci8_result extends CI_DB_result { { oci_free_statement($this->stmt_id); } - - if (is_resource($this->curs_id)) - { - oci_cancel($this->curs_id); - $this->curs_id = NULL; - } } // -------------------------------------------------------------------- @@ -192,8 +178,7 @@ class CI_DB_oci8_result extends CI_DB_result { */ protected function _fetch_assoc() { - $id = ($this->curs_id) ? $this->curs_id : $this->stmt_id; - return oci_fetch_assoc($id); + return oci_fetch_assoc($this->stmt_id); } // -------------------------------------------------------------------- @@ -208,9 +193,7 @@ class CI_DB_oci8_result extends CI_DB_result { */ protected function _fetch_object($class_name = 'stdClass') { - $row = ($this->curs_id) - ? oci_fetch_object($this->curs_id) - : oci_fetch_object($this->stmt_id); + $row = oci_fetch_object($this->stmt_id); if ($class_name === 'stdClass' OR ! $row) { @@ -225,5 +208,4 @@ class CI_DB_oci8_result extends CI_DB_result { return $class_name; } - } -- cgit v1.2.3-24-g4f1b From f0f006c94e9c9a1630d0f8e123c2f4ccfde3413d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 5 Jan 2022 19:59:07 +0200 Subject: [ci skip] Refactor OCI8 driver to use the uniform result_id property instead of its own custom stmt_id --- system/database/drivers/oci8/oci8_result.php | 30 +++++++++------------------- 1 file changed, 9 insertions(+), 21 deletions(-) (limited to 'system/database/drivers/oci8/oci8_result.php') diff --git a/system/database/drivers/oci8/oci8_result.php b/system/database/drivers/oci8/oci8_result.php index 99d3d1067..cf0b33d26 100644 --- a/system/database/drivers/oci8/oci8_result.php +++ b/system/database/drivers/oci8/oci8_result.php @@ -48,13 +48,6 @@ defined('BASEPATH') OR exit('No direct script access allowed'); */ class CI_DB_oci8_result extends CI_DB_result { - /** - * Statement ID - * - * @var resource - */ - public $stmt_id; - /** * Limit used flag * @@ -81,10 +74,10 @@ class CI_DB_oci8_result extends CI_DB_result { { parent::__construct($driver_object); - $this->stmt_id = $driver_object->stmt_id; + $this->result_id = $driver_object->result_id; $this->limit_used = $driver_object->limit_used; $this->commit_mode =& $driver_object->commit_mode; - $driver_object->stmt_id = FALSE; + $driver_object->result_id = FALSE; } // -------------------------------------------------------------------- @@ -96,7 +89,7 @@ class CI_DB_oci8_result extends CI_DB_result { */ public function num_fields() { - $count = oci_num_fields($this->stmt_id); + $count = oci_num_fields($this->result_id); // if we used a limit we subtract it return ($this->limit_used) ? $count - 1 : $count; @@ -116,7 +109,7 @@ class CI_DB_oci8_result extends CI_DB_result { $field_names = array(); for ($c = 1, $fieldCount = $this->num_fields(); $c <= $fieldCount; $c++) { - $field_names[] = oci_field_name($this->stmt_id, $c); + $field_names[] = oci_field_name($this->result_id, $c); } return $field_names; } @@ -136,9 +129,9 @@ class CI_DB_oci8_result extends CI_DB_result { for ($c = 1, $fieldCount = $this->num_fields(); $c <= $fieldCount; $c++) { $F = new stdClass(); - $F->name = oci_field_name($this->stmt_id, $c); - $F->type = oci_field_type($this->stmt_id, $c); - $F->max_length = oci_field_size($this->stmt_id, $c); + $F->name = oci_field_name($this->result_id, $c); + $F->type = oci_field_type($this->result_id, $c); + $F->max_length = oci_field_size($this->result_id, $c); $retval[] = $F; } @@ -160,11 +153,6 @@ class CI_DB_oci8_result extends CI_DB_result { oci_free_statement($this->result_id); $this->result_id = FALSE; } - - if (is_resource($this->stmt_id)) - { - oci_free_statement($this->stmt_id); - } } // -------------------------------------------------------------------- @@ -178,7 +166,7 @@ class CI_DB_oci8_result extends CI_DB_result { */ protected function _fetch_assoc() { - return oci_fetch_assoc($this->stmt_id); + return oci_fetch_assoc($this->result_id); } // -------------------------------------------------------------------- @@ -193,7 +181,7 @@ class CI_DB_oci8_result extends CI_DB_result { */ protected function _fetch_object($class_name = 'stdClass') { - $row = oci_fetch_object($this->stmt_id); + $row = oci_fetch_object($this->result_id); if ($class_name === 'stdClass' OR ! $row) { -- cgit v1.2.3-24-g4f1b From f43bd73f6360f9d15a89527614c9ff696825ce99 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 5 Jan 2022 20:28:27 +0200 Subject: [ci skip] An attempt at a better solution for #5896 --- system/database/drivers/oci8/oci8_result.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'system/database/drivers/oci8/oci8_result.php') diff --git a/system/database/drivers/oci8/oci8_result.php b/system/database/drivers/oci8/oci8_result.php index cf0b33d26..0d57d9428 100644 --- a/system/database/drivers/oci8/oci8_result.php +++ b/system/database/drivers/oci8/oci8_result.php @@ -196,4 +196,19 @@ class CI_DB_oci8_result extends CI_DB_result { return $class_name; } + + // -------------------------------------------------------------------- + + /** + * Destructor + * + * Attempt to free remaining statement IDs. + * + * @see https://github.com/bcit-ci/CodeIgniter/pull/5896 + * @return void + */ + public function __destruct() + { + $this->free_result(); + } } -- cgit v1.2.3-24-g4f1b