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

JModelLegacy: Don't try to use "fast" count method for queries with union #5108

Closed
wants to merge 1 commit into from

Conversation

@Hackwar
Copy link
Member

@Hackwar Hackwar commented Nov 14, 2014

To calculate the total number of items that a query returns, we try to use a faster method by replacing the whole SELECT part with a COUNT(). When we are using a UNION or UNIONALL in our query, this however fails, since the number of fields of the 2 different queries when using COUNT() might differ. This PR excludes such queries from being treated in that special way.

Again, not easily testable, needs a maintainer to do a code review.

I will provide another PR soon, that merges the update and discover view of com_installer and which uses this feature.

@chrisdavenport
Copy link
Contributor

@chrisdavenport chrisdavenport commented Nov 14, 2014

Makes sense. Good catch.

@Bakual
Copy link
Contributor

@Bakual Bakual commented Nov 15, 2014

Makes sense! 👍

@Bakual Bakual added the RTC label Nov 15, 2014
@Bakual
Copy link
Contributor

@Bakual Bakual commented Nov 15, 2014

Set ton RTC

@Bakual Bakual added this to the Joomla! 3.4.0 milestone Nov 21, 2014
@Hackwar Hackwar deleted the Hackwar:databasequery_union branch Dec 10, 2014
@zero-24 zero-24 removed the RTC label Oct 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants