#3386 closed Bug (fixed)

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

Reported by: larsen Owned by:
Priority: major Milestone: 1.9 -- Piwik 1.9
Component: Core Keywords:
Cc: Sensitive: no

Description

Hi,

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.

Lars

Change History (1)

comment:1 Changed 19 months ago by matt (mattab)

  • Milestone set to 1.9 -- Piwik 1.9
  • Resolution set to fixed
  • Status changed from new to closed

Thanks for the report, fixed in [7017]

Note: See TracTickets for help on using tickets.