-
Notifications
You must be signed in to change notification settings - Fork 111
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
BUG Fix compatibility issues with mysql 5.7 and above (fluent 4) #618
base: 4.4
Are you sure you want to change the base?
Conversation
|
||
Deprecation::notification_version('4.0.0', 'tractorcow/silverstripe-fluent'); | ||
|
||
// Credit to https://github.com/sunnysideup thank you for the mysql fix | ||
DB::query("SET SESSION sql_mode='REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE';"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same problem as #617
Need to conditional and apply only to mysql, not postgres / sqlite etc...
FYI we're looking at introducing a sql_mode yml config option here and so it might be worth using that instead: It would mean that you need Silverstripe 4.7 to support MySQL 5.7, though. |
I much prefer the config option to this; I don't want to have to conditionally run this query based on DB backend. |
Note that I assume Fluent doesn't support PGSQL at all right now as there's no way of turning off strict group by on PGSQL. |
It doesn't support postgresql any less than framework does. Until a while back the tests were running postgres (they got turned off at some point I can't recall). It looks like the SS3 -> SS4 rewrite. We should turn it back on to see what's broken. |
It looks like the original issue was due to COALESCE, which fluent probably should not be using anymore for conditions, since locale row should be deterministic (the localisation row exists, or it doesn't). Here's the comment on FluentExtension::localiseCondition().
We probably should just remove COALESCE anyway, but better to turn on postgres tests before we go making any assumptions. :) It should probably mirror localiseSelect() in that it uses a case - when chain for each fallback locale. Next time I get some free time (hah) I'll try this out. |
Fixes #257