Skip to content
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

Different solution for ONLY_FULL_GROUP_BY (see #406) (Issue #80) #407

Merged
merged 2 commits into from
Mar 1, 2020

Conversation

Talon24
Copy link
Contributor

@Talon24 Talon24 commented Mar 8, 2019

This is a different approach to #80 .
Here, we apply the aggregate functions in a subquery and get the defails from the feeds table in the outer query.
This makes it easer to see what we are counting and by what we are grouping by. Also, we don't have to include every column from feeds in the group by.
This uses subqueries rather than a with clause as MySQL only supports that in version 8 upwards.
Also, the table of origin has been added to unread, as all other columns are referenced this way.

This PR is meant to be an alternative to #406 in consultation with @Grotax to put both ways up for discussion.

Copy link
Member

@Grotax Grotax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reverted the switch to xenial as this was introduced by me and is not actually needed.

@Grotax Grotax requested a review from SMillerDev March 25, 2019 09:53
@Grotax
Copy link
Member

Grotax commented Apr 10, 2019

@SMillerDev any comments or can we merge this?

@Grotax
Copy link
Member

Grotax commented Feb 29, 2020

@marco44 could you check this pr and do a review, it has been hanging around for quite some time now but I think it's still relevant

@marco44
Copy link
Contributor

marco44 commented Feb 29, 2020

Yeah, that's way much better than what previous queries did (functional dependency on PK in group by is risky and all SQL engines behave differently on this, so better not rely on it). It's not going to be that costlier (microseconds probably) anyway

@Grotax
Copy link
Member

Grotax commented Mar 1, 2020

closed it by accident :/

@Grotax
Copy link
Member

Grotax commented Mar 1, 2020

Thanks @marco44 and @Talon24 :)

@Grotax Grotax merged commit cc051c6 into nextcloud:master Mar 1, 2020
This was referenced Mar 12, 2020
Grotax added a commit that referenced this pull request Mar 18, 2020
Changed
- Basic Media-RSS support (#599)
- Database index improvements (#637)

Fixed
- Call to a member function getUrlHash() on null" when adding a feed (#640)
- Don't install symfony/console via composer (#636)
- Fix for for ONLY_FULL_GROUP_BY (see #406) (Issue #80) (#407)
- Catch invalid feeds (#646)

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
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.

None yet

3 participants