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

Disabled UserCountry plugin fails on some MySQL versions #10472

Closed
tmuic opened this issue Sep 6, 2016 · 2 comments
Closed

Disabled UserCountry plugin fails on some MySQL versions #10472

tmuic opened this issue Sep 6, 2016 · 2 comments
Labels
duplicate For issues that already existed in our issue tracker and were reported previously.

Comments

@tmuic
Copy link

tmuic commented Sep 6, 2016

It fails due to MySQL "feature" of silently defaulting CHAR(X) not null values to '' (empty string)

So on Distrib 5.5.35, it worked and inserted empty strings silently
and started failing on Distrib 5.7.13 with:
Error query: SQLSTATE[HY000]: General error: 1364 Field 'location_country' doesn't have a default value
All other location_X fields are nullable so propably this one could be nullable as well (or with sane default) in order to avoid such errors.

NOTE: I think this is also possible with strict settings on older MySQL versions

@tmuic
Copy link
Author

tmuic commented Sep 6, 2016

Seems that this is to strict mode enabled by default in 5.7;

SQL mode changes. Strict SQL mode for transactional storage engines (STRICT_TRANS_TABLES) is now enabled by default.

https://dev.mysql.com/doc/refman/5.7/en/mysql-nutshell.html

@mattab
Copy link
Member

mattab commented Sep 27, 2016

What Piwik version are you using?

See #9920 #8930 #5178 #8853

and should be fixed hopefully in the next Piwik 3 beta1 #9231

@mattab mattab closed this as completed Sep 27, 2016
@mattab mattab added the duplicate For issues that already existed in our issue tracker and were reported previously. label Sep 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate For issues that already existed in our issue tracker and were reported previously.
Projects
None yet
Development

No branches or pull requests

2 participants