diff options
author | Bharat Mediratta <bharat@menalto.com> | 2008-12-15 10:10:59 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2008-12-15 10:10:59 +0000 |
commit | b9c45407ec5622e1f29a116f827662bb1bd30b36 (patch) | |
tree | 7294edebc7c35f51399df0459f412cc1c31e6b21 | |
parent | 3ae6ae53e6f146176877c3a808c36fb968d6ae60 (diff) |
Reapply r18995: disable static table caches when we're in TEST_MODE.
-rw-r--r-- | kohana/libraries/drivers/Database/Mysql.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/kohana/libraries/drivers/Database/Mysql.php b/kohana/libraries/drivers/Database/Mysql.php index fd20a08e..8130224d 100644 --- a/kohana/libraries/drivers/Database/Mysql.php +++ b/kohana/libraries/drivers/Database/Mysql.php @@ -262,7 +262,9 @@ class Database_Mysql_Driver extends Database_Driver { public function list_tables(Database $db) { - static $tables; + if (!defined('TEST_MODE')) { + static $tables; + } if (empty($tables) AND $query = $db->query('SHOW TABLES FROM '.$this->escape_table($this->db_config['connection']['database']))) { @@ -282,7 +284,9 @@ class Database_Mysql_Driver extends Database_Driver { public function list_fields($table) { - static $tables; + if (!defined('TEST_MODE')) { + static $tables; + } if (empty($tables[$table])) { |