SQL queries to update Piwik to version 1.8.4 are shown with comments therefore breaking them #3386

anonymous-piwik-user opened this Issue Sep 18, 2012 · 1 comment

2 participants



when updating my Piwik installation, I take the SQL queries that Piwik shows and execute them manually in my SQL client to have better control over it.

Normally this works fine, but with this version there were comments in those queries that broke the query:

INSERT INTO piwik_log_action_duplicates ( SELECT action.idaction AS before, canonical.idaction AS after FROM ( SELECT name, hash, MIN(idaction) AS idaction FROM piwik_log_action AS action_canonical_base WHERE type = 1 AND url_prefix IS NOT NULL GROUP BY name, hash # only grouping by name would be case-insensitive HAVING COUNT(idaction) > 1 ) AS canonical LEFT JOIN piwik_log_action AS action ON (action.type = 1 AND canonical.hash = action.hash) # use index (type, hash) AND canonical.name = action.name AND canonical.idaction != action.idaction ); ;

See the two # parts. As the website states that one should continue executing the other queries if some query might fail, I executed all of them at once. Fortunately, nothing happened in this case, but in general, this is quite critical.

In addition, there are two semi-colons at the end, leading to empty queries and therefore to messages/warnings in my client.


Piwik Open Source Analytics member

Thanks for the report, fixed in [7017]

@anonymous-piwik-user anonymous-piwik-user added this to the 1.9 -- Piwik 1.9 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment