Fixed an AR_caching error where it wasn't tracking table aliases (#3463)
diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php
index 263172a..9035842 100644
--- a/system/database/DB_active_rec.php
+++ b/system/database/DB_active_rec.php
@@ -289,7 +289,7 @@
$this->ar_from[] = $this->_protect_identifiers($this->_track_aliases($val));
if ($this->ar_caching === TRUE)
{
- $this->ar_cache_from[] = $this->_protect_identifiers($val);
+ $this->ar_cache_from[] = $this->_protect_identifiers($this->_track_aliases($val));
}
}
diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php
index 7b024d4..1ed333d 100644
--- a/system/database/drivers/mssql/mssql_driver.php
+++ b/system/database/drivers/mssql/mssql_driver.php
@@ -465,7 +465,7 @@
return "\"{$item}\"";
}
- $exceptions = array('AS', '/', '-', '%', '+', '*');
+ $exceptions = array('AS', '/', '-', '%', '+', '*', 'OR', 'IS');
foreach ($exceptions as $exception)
{
diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php
index edf09a1..2bc66ec 100644
--- a/system/database/drivers/mysql/mysql_driver.php
+++ b/system/database/drivers/mysql/mysql_driver.php
@@ -471,7 +471,7 @@
return "`{$item}`";
}
- $exceptions = array('AS', '/', '-', '%', '+', '*');
+ $exceptions = array('AS', '/', '-', '%', '+', '*', 'OR', 'IS');
foreach ($exceptions as $exception)
{
diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php
index 73396c5..6ff37f7 100644
--- a/system/database/drivers/mysqli/mysqli_driver.php
+++ b/system/database/drivers/mysqli/mysqli_driver.php
@@ -464,7 +464,7 @@
return "`{$item}`";
}
- $exceptions = array('AS', '/', '-', '%', '+', '*');
+ $exceptions = array('AS', '/', '-', '%', '+', '*', 'OR', 'IS');
foreach ($exceptions as $exception)
{
diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php
index ec26f5b..364268b 100644
--- a/system/database/drivers/oci8/oci8_driver.php
+++ b/system/database/drivers/oci8/oci8_driver.php
@@ -576,7 +576,7 @@
return "\"{$item}\"";
}
- $exceptions = array('AS', '/', '-', '%', '+', '*');
+ $exceptions = array('AS', '/', '-', '%', '+', '*', 'OR', 'IS');
foreach ($exceptions as $exception)
{
diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php
index bdedab3..82fe36b 100644
--- a/system/database/drivers/odbc/odbc_driver.php
+++ b/system/database/drivers/odbc/odbc_driver.php
@@ -437,7 +437,7 @@
return "{$item}";
}
- $exceptions = array('AS', '/', '-', '%', '+', '*');
+ $exceptions = array('AS', '/', '-', '%', '+', '*', 'OR', 'IS');
foreach ($exceptions as $exception)
{
diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php
index ce8cb25..4eff97f 100644
--- a/system/database/drivers/postgre/postgre_driver.php
+++ b/system/database/drivers/postgre/postgre_driver.php
@@ -461,7 +461,7 @@
return "\"{$item}\"";
}
- $exceptions = array('AS', '/', '-', '%', '+', '*');
+ $exceptions = array('AS', '/', '-', '%', '+', '*', 'OR', 'IS');
foreach ($exceptions as $exception)
{
diff --git a/system/database/drivers/sqlite/sqlite_driver.php b/system/database/drivers/sqlite/sqlite_driver.php
index c51edfb..c859dea 100644
--- a/system/database/drivers/sqlite/sqlite_driver.php
+++ b/system/database/drivers/sqlite/sqlite_driver.php
@@ -455,7 +455,7 @@
return "{$item}";
}
- $exceptions = array('AS', '/', '-', '%', '+', '*');
+ $exceptions = array('AS', '/', '-', '%', '+', '*', 'OR', 'IS');
foreach ($exceptions as $exception)
{