@anonymous-piwik-user opened this Issue on September 29th 2010

At least one of the queries that updates a visit has an unnecessary LIMIT that causes mySQL warnings when using replication. For a busy installation this grows the log file excessively. It also appears to have extra WHERE conditions that aren't required.


100929 11:32:53 [Warning] Statement may not be safe to log in statement format. Statement: /* SHARDING_ID_SITE = 87 */
                                                UPDATE piwik_log_visit
                                                SET visit_total_actions = visit_total_actions + 1,  visit_exit_idaction_url = '52003', visit_last_action_time = '2010-09-29 15:32:53', visit_total_time = '10'
                                                WHERE idsite = '87'
                                                        AND idvisit = '8235537'
                                                        AND visitor_idcookie = 'efa9f489fa1263fcd2ae1f6a36054dc6'
                                                LIMIT 1

Since idvisit is unique there is no reason to have a limit, idsite or visitor_cookie in the query. At the very least, removing the LIMIT will prevent the mySQL warning.

@robocoder commented on September 29th 2010 Contributor

(In [3195]) fixes #1739 - remove LIMIT clause; leaving the WHERE clause intact until we address #409

This Issue was closed on September 29th 2010
Powered by GitHub Issue Mirror