@ToBeReplaced opened this Issue on November 9th 2014

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 commented on November 10th 2014 Owner

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 commented on November 10th 2014

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 commented on November 11th 2014 Owner

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

@tsteur commented on November 11th 2014 Owner

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 commented on November 11th 2014

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 commented on November 11th 2014 Owner

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

@tsteur commented on December 13th 2015 Owner

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

This Issue was closed on December 15th 2015
Powered by GitHub Issue Mirror