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

Make Piwik compatible with sql_mode = STRICT_TRANS_TABLES (MySQL 5.6 default and best practise) #5178

Closed
mattab opened this issue May 18, 2014 · 5 comments
Assignees
Labels
c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Milestone

Comments

@mattab
Copy link
Member

mattab commented May 18, 2014

Mysql 5.6 now introduces default STRICT_TRANS_TABLES sql_mode, in the my.cnf config file.

All users installing Mysql 5.6 and older now have this enabled. It partly breaks a lot of popular open source software, including Piwik.

The goal of this ticket is to set
- mysql -e "SET GLOBAL sql_mode = 'NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES'"

in https://github.com/piwik/piwik/blob/master/plugins/CoreConsole/templates/travis.yml.twig
and make all tests pass.

eg.

@mattab
Copy link
Member Author

mattab commented May 18, 2014

Enabled the STRICT_TRANS_TABLES mode in: 316d9f4

Enabled Mysql 5.6 on CI: 20bd2e1
(maybe this could be reverted later as using 5.6 was not actually related to this ticket)

Fix notice: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1101 BLOB/TEXT column 'additional_emails' can't have a default value in matomo-org/plugin-CustomAlerts@2a0c807

@mattab
Copy link
Member Author

mattab commented May 18, 2014

In f84b45c: We do not actually Mysql 5.6 to test with STRICT_TRANS_TABLES enabled. Refs #5178

@mattab
Copy link
Member Author

mattab commented May 18, 2014

email_me is integer, fixes: General error: 1366 Incorrect integer value: '' for column 'email_me' at row 1 https://travis-ci.org/piwik/piwik/jobs/25436325
in: matomo-org/plugin-CustomAlerts@6a461e8

Set BOOLEAN column default to '0' and add schema Update script. in matomo-org/plugin-CustomAlerts@9c2b843

@mattab
Copy link
Member Author

mattab commented May 18, 2014

In 2b974f8: Refs #5178 Disable STRICT mode for now since there still are many failing tests.

@mattab mattab added this to the 2.5.0 - Piwik 2.5.0 milestone Jul 8, 2014
@mattab mattab modified the milestones: Short term, Piwik 2.7.0 Aug 21, 2014
@mattab mattab modified the milestones: Piwik 2.9.0, Piwik 2.8.0 Sep 15, 2014
sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
@mattab mattab added the c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. label Oct 10, 2014
@mattab mattab modified the milestones: Piwik 2.9.0, Piwik 2.10.0 Oct 23, 2014
@diosmosis diosmosis self-assigned this Dec 3, 2014
@mattab
Copy link
Member Author

mattab commented Oct 6, 2015

fyi: seems it regressed a little in #8853

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Projects
None yet
Development

No branches or pull requests

2 participants