Skip to content

Conversation

@nickvergessen
Copy link
Member

Backport of #7032

@nickvergessen
Copy link
Member Author

/backport to stable22

MySQL docs:
Reject queries for which the select list, HAVING condition, or ORDER BY
list refer to nonaggregated columns that are neither named in the GROUP BY
clause nor are functionally dependent on (uniquely determined by) GROUP BY columns.

MariaDB docs:
For SELECT ... GROUP BY queries, disallow SELECTing columns which are
not referred to in the GROUP BY clause, unless they are passed to an
aggregate function like COUNT() or MAX(). Produce a 1055 error.

Ref https://jira.mariadb.org/browse/MDEV-11588

Similarly Oracle seems to fail with the query before

Signed-off-by: Joas Schilling <[email protected]>
…needs it

Also fixes a problem with MariaDB ONLY_FULL_GROUP_BY and Oracle

Signed-off-by: Joas Schilling <[email protected]>
Also fixes a problem with MariaDB ONLY_FULL_GROUP_BY and Oracle

Signed-off-by: Joas Schilling <[email protected]>
@nickvergessen nickvergessen force-pushed the backport/7032/stable23 branch from a296ae0 to e712de8 Compare March 22, 2022 12:47
@nickvergessen nickvergessen marked this pull request as ready for review March 23, 2022 07:19
@nickvergessen nickvergessen merged commit 071eb10 into stable23 Mar 23, 2022
@nickvergessen nickvergessen deleted the backport/7032/stable23 branch March 23, 2022 07:20
@backportbot-nextcloud
Copy link

The backport to stable22 failed. Please do this backport manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants