Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Spurious SQL conditions creating excessive mySQL warnings #1739

Closed
anonymous-piwik-user opened this Issue · 1 comment

2 participants

@anonymous-piwik-user

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.

Example:

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
Collaborator

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

@anonymous-piwik-user anonymous-piwik-user added this to the Piwik 1.1 milestone
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.