summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2015-07-31 12:48:59 +0200
committerAndrey Andreev <narf@devilix.net>2015-07-31 12:48:59 +0200
commit0d2d84f173910df67ace4dcdb2032478b62b9e68 (patch)
treed8abc712a4122e371ca841c47526ea5390f8ed31
parent948cefc49f470b2a82422f6c4fdc8cfb02c8f86a (diff)
Fix #4012
-rw-r--r--system/database/DB_query_builder.php5
-rw-r--r--user_guide_src/source/changelog.rst1
2 files changed, 5 insertions, 1 deletions
diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php
index 293419e23..7f3334763 100644
--- a/system/database/DB_query_builder.php
+++ b/system/database/DB_query_builder.php
@@ -807,7 +807,10 @@ abstract class CI_DB_query_builder extends CI_DB_driver {
$where_in = array_values($values);
}
- $prefix = (count($this->qb_where) === 0) ? $this->_group_get_type('') : $this->_group_get_type($type);
+ $prefix = (count($this->qb_where) === 0 && count($this->qb_cache_where) === 0)
+ ? $this->_group_get_type('')
+ : $this->_group_get_type($type);
+
$where_in = array(
'condition' => $prefix.$key.$not.' IN('.implode(', ', $where_in).')',
'escape' => $escape
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 5d1a3abba..e409cc696 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -74,6 +74,7 @@ Bug fixes for 3.0.1
- Fixed a bug (#4000) - :doc:`Pagination Library <libraries/pagination>` didn't enable "rel" attributes by default if no attributes-related config options were used.
- Fixed a bug (#4004) - :doc:`URI Class <libraries/uri>` didn't properly parse the request URI if it contains a colon followed by a digit.
- Fixed a bug in :doc:`Query Builder <database/query_builder>` where the ``$escape`` parameter for some methods only affected field names.
+- Fixed a bug (#4012) - :doc:`Query Builder <database/query_builder>` methods ``where_in()``, ``or_where_in()``, ``where_not_in()``, ``or_where_not_in()`` didn't take into account previously cached WHERE conditions when query cache is in use.
Version 3.0.0
=============