Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"piwik_option" table name should be quoted in SQL "version_core" update statement #2260

Closed
anonymous-matomo-user opened this issue Apr 4, 2011 · 4 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@anonymous-matomo-user
Copy link

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.

@robocoder
Copy link
Contributor

(In [4303]) fixes #2260 - thanks element

@robocoder
Copy link
Contributor

Perhaps a proxy server in your network cached an older version? 1.2-rc2 is the pre-release candidate for 1.2.

As far as I can see, the actual 1.2.1 release would have set version_core to 1.2.1.

@anonymous-matomo-user
Copy link
Author

When I went to change it back to 1.1.1 to get the update to run again, it was indeed set to 1.2.1. So I'm not sure why the update SQL statements had 1.2-rc2. I never installed that version either and there shouldn't be any proxy server on my DSL connection. The only thing I can think of is that the copy/paste SQL statements somehow differ from what is actually executed. Wish I could be more helpful on that one, doesn't seem like a major issue though.

@robocoder
Copy link
Contributor

to clarify, in the case of an update, the sql shown will include all the intermediate statements. the final result should be 1.2.1.

@anonymous-matomo-user anonymous-matomo-user added this to the Piwik 1.3 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
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

2 participants