summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2008-12-03 04:27:29 +0000
committerBharat Mediratta <bharat@menalto.com>2008-12-03 04:27:29 +0000
commitdc35a005bcf07c8ee57c355549b5f79da22b5b01 (patch)
treeaac30f6fd901734309faa33c4ebe743fe5759928
parent718ac67a02aa6fea73b6ed4ff3b092e77320798b (diff)
Don't cache the table field definition when we're in test mode, else
all the table changing shenanigans we do to add permissions and groups will fail to register.
-rw-r--r--kohana/libraries/drivers/Database/Mysql.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/kohana/libraries/drivers/Database/Mysql.php b/kohana/libraries/drivers/Database/Mysql.php
index 57459b4e..9f0175ec 100644
--- a/kohana/libraries/drivers/Database/Mysql.php
+++ b/kohana/libraries/drivers/Database/Mysql.php
@@ -276,7 +276,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]))
{