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

Column not found location_provider - Alter ignore was removed in MySQL 5.7.5 #6623

Closed
ToBeReplaced opened this issue Nov 9, 2014 · 7 comments
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@ToBeReplaced
Copy link

Fresh install (2.8.3) in a docker container with linked mysql database.

Error in Piwik (tracker): Error query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'location_provider' in 'field list'                                 
In query: INSERT INTO piwik_log_visit (idvisitor, ...

An attempt to deactivate and reactivate "Provider" yields:

There was a problem installing the plugin Provider: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IGNORE TABLE `piwik_log_visit` ADD `location_provider` VARCHAR( 100 ) NULL' at line 1 If this plugin has already been installed, and if you want to hide this message</b>, you must add the following line under the [PluginsInstalled] entry in your config/config.ini.php file: PluginsInstalled[] = Provider

It seems this was once an issue in #4989 and #4886 .

Is there a specific mysql version that is supported (if that is the issue)? On 5.7.5.

I tried to distill the information to only what seemed relevant. Please advise if there is more required.

@mattab
Copy link
Member

mattab commented Nov 10, 2014

thanks for report. Im confused and don't know why this query does not work for you:

ALTER IGNORE TABLE piwik_log_visit ADD `location_provider` VARCHAR( 100 ) NULL

maybe something changed in MySQL 5.7.5... anyone else experiencing this issue?

@ToBeReplaced
Copy link
Author

Issue found. See the removed features here: https://dev.mysql.com/doc/refman/5.7/en/mysql-nutshell.html

The IGNORE clause for ALTER TABLE has been removed as of MySQL 5.7.

Consequently, piwik as it is today cannot be installed on MySQL 5.7+. A grep on the codebase yielded the IGNORE clause only in the Updates directory and the Provider plugin. Maybe there's a quick fix?

@mattab
Copy link
Member

mattab commented Nov 11, 2014

@tsteur can we maybe remove IGNORE or work around this, for Mysql 5.7 compat?

@mattab mattab added this to the Piwik 2.9.0 milestone Nov 11, 2014
@mattab mattab added the Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change. label Nov 11, 2014
@tsteur
Copy link
Member

tsteur commented Nov 11, 2014

I think we can sometimes remove them and sometimes we have to workaround it like this: http://www.tocker.ca/2013/11/06/the-future-of-alter-ignore-table-syntax.html

alter ignore seems to be used quite a few times and I don't know why they are sometimes used and whether there could be actually duplicates

@ToBeReplaced
Copy link
Author

Thanks for looking into it team. I would be satisfied with closing the issue if you want to create a new issue specifically to address MySQL 5.7 support. My needs are met just by rolling back to an older version of MySQL.

@mattab mattab modified the milestones: Piwik 2.10.0 , Piwik 2.9.0 Nov 11, 2014
@mattab
Copy link
Member

mattab commented Nov 11, 2014

@ToBeReplaced feel free to create a new issue for Mysql 5.7 support, cheers

@tsteur
Copy link
Member

tsteur commented Dec 13, 2015

I'm reopening this one as it makes it easier to work on MySQL 5.7 support

@tsteur tsteur reopened this Dec 13, 2015
@tsteur tsteur modified the milestones: 2.15.1, 2.10.0 Dec 13, 2015
@tsteur tsteur added Bug For errors / faults / flaws / inconsistencies etc. and removed Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change. labels Dec 13, 2015
@tsteur tsteur self-assigned this Dec 13, 2015
@tsteur tsteur changed the title Column not found location_provider Column not found location_provider - Alter ignore was removed in MySQL 5.7.5 Dec 13, 2015
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

3 participants