Join GitHub today
Don't want to overwrite sql_mode, but how is gone. #17370
By #16065 have been merged, sql_mode came to be always overwritten regardless of activerecord's strict_mode.
If sql_mode is not set properly in MySQL side, strict_mode is useful.
If sql_mode is set properly in MySQL side, there is no need to override sql_mode for each connection.
In MySQL 5.6, default my.cnf includes
In MySQL 5.7.5, default sql_mode is
I think how want to not overwrite sql_mode that we needed.
Well, prior to that, we were already setting it when
It's unfortunate that MySQL (as far as I'm aware) doesn't offer a syntax by which we can "append" to
@matthewd Indeed, I think too that MySQL is should support a syntax by which we can append to sql_mode (as well as optimizer_switch). If not, it will not be able to achieve strict_mode efficiently without affecting existing sql_mode.
#16065 was because fixes a test failure.
Yeah.. but that was just a convenient lie: AR believed one thing was happening, while MySQL did something different.
Instead of restoring the confusion of
Or maybe we can check the MySQL version, and only set
The latter has the disadvantage that it re-introduces potential disagreement: historically, we were counting on the fact that MySQL's default
This issue has been automatically marked as stale because it has not been commented on for at least
The resources of the Rails team are limited, and so we are asking for your help.
If you can still reproduce this error on the
Thank you for all your contributions.