Skip to content

Conversation

@nickvergessen
Copy link
Member

@nickvergessen nickvergessen commented Mar 21, 2022

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.

@nickvergessen nickvergessen marked this pull request as draft March 21, 2022 08:21
@nickvergessen nickvergessen added this to the 💛 Next Major (24) milestone Mar 21, 2022
@nickvergessen nickvergessen self-assigned this Mar 21, 2022
@nickvergessen nickvergessen added 2. developing feature: api 🛠️ OCS API for conversations, chats and participants labels Mar 21, 2022
@nickvergessen nickvergessen force-pushed the bugfix/noid/try-setting-ONLY_FULL_GROUP_BY-option branch from dcf8db1 to acb1942 Compare March 21, 2022 08:30
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]>
@nickvergessen nickvergessen force-pushed the bugfix/noid/try-setting-ONLY_FULL_GROUP_BY-option branch from 8fc6919 to 9d5cfbd Compare March 21, 2022 10:09
@nickvergessen nickvergessen marked this pull request as ready for review March 21, 2022 10:09
@nickvergessen
Copy link
Member Author

/backport to stable23

@nickvergessen
Copy link
Member Author

/backport to stable22

@nickvergessen nickvergessen changed the title Set ONLY_FULL_GROUP_BY option for MySQL Group on PHP level as MariaDB can not handle this correctly Mar 21, 2022
@nickvergessen
Copy link
Member Author

More problems found in #7032
And we need to port them to this backportable branch.
Due to the drone config change #7032 can not be backported automatically

…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
Copy link
Member Author

Please review very soon @vitormattos

@nickvergessen nickvergessen merged commit 9326949 into master Mar 22, 2022
@nickvergessen nickvergessen deleted the bugfix/noid/try-setting-ONLY_FULL_GROUP_BY-option branch March 22, 2022 10:54
@backportbot-nextcloud
Copy link

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

@backportbot-nextcloud
Copy link

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

@nickvergessen
Copy link
Member Author

Backporting in #7036

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

Labels

3. to review feature: api 🛠️ OCS API for conversations, chats and participants

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants