"piwik_option" table name should be quoted in SQL "version_core" update statement
|Reported by:||element||Owned by:|
I did an upgrade from Piwik 1.1.1 to 1.2.1 and it seemed everything was OK. But several days later I logged in and found that many of the displays gave the error:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'visitor_idcookie' in 'field list'
So it became apparent that something had gone wrong with the upgrade. I set the version_core field to 1.1.1 as described in the forum and manually applied the update SQL queries. I found that the last one failed though because of a reserved word use:
UPDATE option SET option_value = "1.2-rc2" WHERE option_name = "version_core";
I don't have a table prefix defined, so the option table's name is simply "option". This is a reserved MySQL word. Quoting it, fixed the problem. Not sure if this was the reason why the original update went bad though. As a second potential issue, shouldn't the option_value be set to 1.2.1 instead of 1.2-rc2? I copied and pasted the SQL statements from the update page.
Change History (5)
comment:2 Changed 3 years ago by vipsoft (robocoder)
- Resolution set to fixed
- Status changed from new to closed