remove useless queries with false conditions (e.g 1=0)
What does this MR do?
Remove useless queries with false conditions (e.g 1=0).
The additional query with false condition is generated from IssuableCollections#issuable_meta_data
when issuable_ids
is empty:
(e.g. SELECT "merge_requests_closing_issues"."issue_id", COUNT(*) as count FROM "merge_requests_closing_issues" WHERE 1=0 GROUP BY "merge_requests_closing_issues"."issue_id"
)
To reproduce it locally, visit this url: http://localhost:3000/gitlab-org/gitlab-test/issues?scope=all&utf8=%E2%9C%93&state=opened&search=test
.
Are there points in the code the reviewer needs to double check?
Why was this MR needed?
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Closes #29492 (closed)