summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2016-06-08 10:06:59 +0200
committerAndrey Andreev <narf@devilix.net>2016-06-08 10:06:59 +0200
commited6f01077abb8946b54413d383fa1b7b46cd3d1f (patch)
tree96e2953ae40ab8e6161746ea9cd33566f02c4b56 /system
parent83630055ab671867b14f02d45370eb0bc41a0cb0 (diff)
Make db_select() clear cached database metadata
Diffstat (limited to 'system')
-rw-r--r--system/database/drivers/mssql/mssql_driver.php1
-rw-r--r--system/database/drivers/mysql/mysql_driver.php1
-rw-r--r--system/database/drivers/mysqli/mysqli_driver.php1
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php1
-rw-r--r--system/database/drivers/sqlsrv/sqlsrv_driver.php1
5 files changed, 5 insertions, 0 deletions
diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php
index d40d67a0b..66d7572e4 100644
--- a/system/database/drivers/mssql/mssql_driver.php
+++ b/system/database/drivers/mssql/mssql_driver.php
@@ -158,6 +158,7 @@ class CI_DB_mssql_driver extends CI_DB {
if (mssql_select_db('['.$database.']', $this->conn_id))
{
$this->database = $database;
+ $this->data_cache = array();
return TRUE;
}
diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php
index 78b1d703a..7804dda58 100644
--- a/system/database/drivers/mysql/mysql_driver.php
+++ b/system/database/drivers/mysql/mysql_driver.php
@@ -208,6 +208,7 @@ class CI_DB_mysql_driver extends CI_DB {
if (mysql_select_db($database, $this->conn_id))
{
$this->database = $database;
+ $this->data_cache = array();
return TRUE;
}
diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php
index 06c34187f..f52163c2d 100644
--- a/system/database/drivers/mysqli/mysqli_driver.php
+++ b/system/database/drivers/mysqli/mysqli_driver.php
@@ -256,6 +256,7 @@ class CI_DB_mysqli_driver extends CI_DB {
if ($this->conn_id->select_db($database))
{
$this->database = $database;
+ $this->data_cache = array();
return TRUE;
}
diff --git a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php
index 70f2bfd4e..38a5a8aff 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php
@@ -218,6 +218,7 @@ class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver {
if (FALSE !== $this->simple_query('USE '.$this->escape_identifiers($database)))
{
$this->database = $database;
+ $this->data_cache = array();
return TRUE;
}
diff --git a/system/database/drivers/sqlsrv/sqlsrv_driver.php b/system/database/drivers/sqlsrv/sqlsrv_driver.php
index 0cd9ce16d..c55d5f7b7 100644
--- a/system/database/drivers/sqlsrv/sqlsrv_driver.php
+++ b/system/database/drivers/sqlsrv/sqlsrv_driver.php
@@ -171,6 +171,7 @@ class CI_DB_sqlsrv_driver extends CI_DB {
if ($this->_execute('USE '.$this->escape_identifiers($database)))
{
$this->database = $database;
+ $this->data_cache = array();
return TRUE;
}