-
Notifications
You must be signed in to change notification settings - Fork 141
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
Roles->descendants() not working #89
Comments
Nice find. I recommend submitting a patch as a merge request. |
If I remember correctly, there was a SQL that you send to the database instead of changing my.cnf to make the session behavior traditional. I don’t remember the details, if someone does please post.
-A
… On Apr 27, 2017, at 8:57 AM, shawn faison ***@***.***> wrote:
Nice find. I recommend submitting a patch as a merge request.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#89 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABVjW0yGzNLUr8xv3lDLQqByoRDcUxQzks5r0LrcgaJpZM4MO84A>.
|
reproduced this issue in mysql 5.7.24. Do we have plan to update the SQL query on descendantsConditional(...) function? |
We can, but I have no recollection of it at the moment.
Can you take a look at the query and see if you can do anything about it?
… On Dec 3, 2018, at 10:19 PM, Shawn Chen ***@***.***> wrote:
reproduced this issue in mysql 5.7.24. Do we have plan to update the SQL query on descendantsConditional(...) function?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#89 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABVjW4HZ6kBWLV26VLMCd0cBY-zrQrY9ks5u1em_gaJpZM4MO84A>.
|
The query should be something like this: And below is the error. Yeah, I'm trying to take a deep look at it. |
Add a aggregrate function group_concat in the select list for fix: |
With mysql >= 5.7, this does not work anymore - it returns an empty array (and hides the SQL error). The issue is with the GROUP BY clause, whose behaviour was changed with this update.
http://craftcms.stackexchange.com/questions/12084/getting-this-sql-error-group-by-incompatible-with-sql-mode-only-full-group-by
The easiest solution is to revert back to previous mysql behaviour, which can be accomplished by setting sql-mode to TRADITIONAL. This can be done at runtime globally, per session or at startup in a config file.
https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html
Easiest for me was to update my.cnf to contain sql_mode=TRADITIONAL under [mysqld], which removes the problematic ONLY_FULL_GROUP_BY mode.
Of course a better solution would be to update the SQL query.
The text was updated successfully, but these errors were encountered: