From 5a335c4d955bbb74a50ca30ac45d30f6ef66774d Mon Sep 17 00:00:00 2001 From: Bob Van Landuyt Date: Fri, 17 Nov 2017 15:55:43 +0100 Subject: Remove the selects when counting the last page The last page of the first collection is only loaded into memory when it is being viewed. If it isn't loaded into memory, the `#size` call triggers a count query. This `#count` would generate an invalid query if our custom preloaded counts are included by adding a separate `as count_column` alias on top of the count aliases. Removing the selects in this case will make sure a valid `COUNT(*)` is generated. --- changelogs/unreleased/bvl-fix-count-with-selects.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 changelogs/unreleased/bvl-fix-count-with-selects.yml (limited to 'changelogs/unreleased') diff --git a/changelogs/unreleased/bvl-fix-count-with-selects.yml b/changelogs/unreleased/bvl-fix-count-with-selects.yml new file mode 100644 index 00000000000..46a882de524 --- /dev/null +++ b/changelogs/unreleased/bvl-fix-count-with-selects.yml @@ -0,0 +1,6 @@ +--- +title: Fix crash when navigating to second page of the group dashbaord when there + are projects and groups on the first page +merge_request: 15456 +author: +type: fixed -- cgit v1.2.1