diff options
author | mattpiwik <matthieu.aubry@gmail.com> | 2010-04-13 10:30:50 +0400 |
---|---|---|
committer | mattpiwik <matthieu.aubry@gmail.com> | 2010-04-13 10:30:50 +0400 |
commit | 03fcff5fd7b072f6823fe4c10a56bad709349241 (patch) | |
tree | 3b900129a1db6cfc351756e42399d5d75d94871e /core/Tracker/Db.php | |
parent | e2a34c722997066e0e4d35fccfb4a13809608357 (diff) |
Refs #56
* reverted field log_visit.visit_server_date and the INDEX on this field, as it is used by Tracker_Visit->recognizeTheVisitor() and significantly breaks performance if removed. The index on visit_last_action_time that was used instead has a very high cardinality, and queries were very slow, locking up the whole table. Drawback is that we now have 2 distinct large indexes on the largest Piwik table...
* Fixed issue from forum where archiving for today failed to execute in the crontab http://forum.piwik.org/index.php?showtopic=7211
* Fixed warning in Piwik_Tracker_Db->fetchOne causing tracking to fail on empty cache
git-svn-id: http://dev.piwik.org/svn/trunk@2091 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'core/Tracker/Db.php')
-rw-r--r-- | core/Tracker/Db.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/Tracker/Db.php b/core/Tracker/Db.php index 97112dafca..331fb3593a 100644 --- a/core/Tracker/Db.php +++ b/core/Tracker/Db.php @@ -161,7 +161,7 @@ abstract class Piwik_Tracker_Db public function fetchOne( $query, $parameters = array() ) { $result = $this->fetch($query, $parameters); - return is_array($result) ? $result[0] : false; + return is_array($result) && !empty($result) ? reset($result) : false; } /** |