summaryrefslogtreecommitdiffstats
path: root/system/database/drivers
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2018-03-22 16:00:47 +0100
committerAndrey Andreev <narf@devilix.net>2018-03-22 16:00:47 +0100
commitc243df3af851fe90cd272f3958f7eb7bf76173b1 (patch)
tree83e8bda62fe6c5b40b7cd93cbc6c6c3a8214cc03 /system/database/drivers
parentf3e19ac4990e1e3fbc6964e97e7e09e506935d6e (diff)
parent3d2073e877cb1fddbea8fcec5bc5d38b545cdcfa (diff)
Merge branch '3.1-stable' into develop
Conflicts resolved: system/core/CodeIgniter.php system/core/Security.php system/database/DB_query_builder.php system/libraries/Email.php user_guide_src/source/changelog.rst user_guide_src/source/conf.py user_guide_src/source/installation/downloads.rst user_guide_src/source/installation/upgrading.rst
Diffstat (limited to 'system/database/drivers')
-rw-r--r--system/database/drivers/oci8/oci8_driver.php15
-rw-r--r--system/database/drivers/postgre/postgre_driver.php7
2 files changed, 17 insertions, 5 deletions
diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php
index 1bd977390..b90db4bd2 100644
--- a/system/database/drivers/oci8/oci8_driver.php
+++ b/system/database/drivers/oci8/oci8_driver.php
@@ -97,7 +97,7 @@ class CI_DB_oci8_driver extends CI_DB {
*
* @var bool
*/
- public $limit_used;
+ public $limit_used = FALSE;
// --------------------------------------------------------------------
@@ -685,4 +685,17 @@ class CI_DB_oci8_driver extends CI_DB {
oci_close($this->conn_id);
}
+ // --------------------------------------------------------------------
+
+ /**
+ * We need to reset our $limit_used hack flag, so it doesn't propagate
+ * to subsequent queries.
+ *
+ * @return void
+ */
+ protected function _reset_select()
+ {
+ $this->limit_used = FALSE;
+ parent::_reset_select();
+ }
}
diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php
index cae162e2e..e9b1e991c 100644
--- a/system/database/drivers/postgre/postgre_driver.php
+++ b/system/database/drivers/postgre/postgre_driver.php
@@ -218,8 +218,8 @@ class CI_DB_postgre_driver extends CI_DB {
* and so we'll have to fall back to running a query in
* order to get it.
*/
- return isset($pg_version['server'])
- ? $this->data_cache['version'] = $pg_version['server']
+ return (isset($pg_version['server']) && preg_match('#^(\d+\.\d+)#', $pg_version['server'], $match))
+ ? $this->data_cache['version'] = $match[1]
: parent::version();
}
@@ -348,8 +348,7 @@ class CI_DB_postgre_driver extends CI_DB {
*/
public function insert_id()
{
- $v = pg_version($this->conn_id);
- $v = isset($v['server']) ? $v['server'] : 0; // 'server' key is only available since PosgreSQL 7.4
+ $v = $this->version();
$table = (func_num_args() > 0) ? func_get_arg(0) : NULL;
$column = (func_num_args() > 1) ? func_get_arg(1) : NULL;