-
Notifications
You must be signed in to change notification settings - Fork 174
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
[Radiological review module] because sql_mode=only_full_group_by on mysql 5.7 (redmine 11703) #2494
[Radiological review module] because sql_mode=only_full_group_by on mysql 5.7 (redmine 11703) #2494
Conversation
I think the whole GROUP BY and GROUP CONCAT can be removed instead. |
@@ -190,7 +190,8 @@ class NDB_Form_final_radiological_review extends NDB_Form | |||
LEFT JOIN tarchive t ON (upper(t.PatientName) | |||
LIKE CONCAT(upper(c.PSCID), '_', upper(s.CandID), '_', upper(s.visit_label), '%')) |
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.
this is costy... (my 2 cents)
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.
I think you commented on the wrong line? (It's showing up as a comment on a line that doesn't contain any changes..)
Found that in my project, there are cases where there are multiple tarchive files, this would make a query without group by return more than one result. Group concat takes care of showing the multiple source locations. |
Successfully resurrected the module on MySQL 5.7 👍 🎖 |
@alisterdev If your manual tests passed, can you approve this pull request? |
@gluneau I though approving was for code review and I have no idea whether its good or not (especially given discussion above) |
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.
Manual tests worked!
…ysql 5.7 (redmine 11703) (aces#2494) * fix group by for mysql 5.7 * Prevents Subquery to returns more than 1 row
This fixes this error:
Error Code: 1055. Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'fi.FileID' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by