-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
CLOUDSTACK-9871: Set SQL Mode in SQL Session for MySQL 5.7 compatibility #2037
Conversation
LGTM |
MySQL 5.7 has a more strict SQL mode by default with which CloudStack is not compatible. By setting the SQL Mode to a more relaxed mode on run-time we can run without changing any SQL server settings. Admins could also apply this to the [mysqld] section of their my.cnf: sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' Signed-off-by: Wido den Hollander <wido@widodh.nl>
Done @rhtyd, how does this look like? |
Lgtm |
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-635 |
Do you know if this have an impact if we still use MySQL 5.6 or MySQL 5.5 on another host and have CloudStack installed on Ubuntu or CentOS 7 ? |
@pdion891 I'll run regression tests |
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
Trillian test result (tid-990)
|
@pdion891: As far as I know this should have no impact on 5.6 We simply tell the SQL server which modes we want to have enabled. Starting with MySQL 5.7 various modes have been disabled by default, we just enable them again. On the long run we should fix the queries CloudStack executes. |
LGTM (I tested the settings weeks ago on 5.7 and can confirm they worked) |
MySQL 5.7 has a more strict SQL mode by default with which CloudStack
is not compatible.
By setting the SQL Mode to a more relaxed mode on run-time we can
run without changing any SQL server settings.
Admins could also apply this to the [mysqld] section of their my.cnf:
sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
Signed-off-by: Wido den Hollander wido@widodh.nl