[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15986061#comment-15986061
 ] 

ASF subversion and git services commented on CLOUDSTACK-9871:
-------------------------------------------------------------

Commit 0c1c27ba85bbe6812e7d07fe05e999abf0574b33 in cloudstack's branch 
refs/heads/4.9 from [~widodh]
[ https://gitbox.apache.org/repos/asf?p=cloudstack.git;h=0c1c27b ]

CLOUDSTACK-9871: Set SQL Mode in SQL Session for MySQL 5.7 compatibility

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 <[email protected]>


> MySQL 5.7 compatibility
> -----------------------
>
>                 Key: CLOUDSTACK-9871
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9871
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: Management Server
>    Affects Versions: 4.10.0.0
>         Environment: Ubuntu 16.04, MySQL 5.7
>            Reporter: Wido den Hollander
>            Priority: Minor
>              Labels: jdbc, mysql
>
> MySQL 5.7 comes with a more strict SQL mode by default which causes problems 
> for CloudStack as the queries it executes are not all compatible with MySQL 
> 5.7.
> https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html
> A work-around is setting the sql_mode to a more relaxed mode in the my.cnf:
> [mysqld]
> sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
> In the future CloudStack should be fully compatible with the new SQL mode.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to