diff options
author | Nick Thomas <nick@gitlab.com> | 2019-06-13 16:12:28 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2019-07-23 18:53:03 +0300 |
commit | 4aa76dddecc048cef24963323afe59f1c120cb72 (patch) | |
tree | 0a15518b73ee1646d09161954cbefb577d249138 /lib/api | |
parent | d892e80bf0161b535389c91ccb53539e4f08d790 (diff) |
Remove dead MySQL code
None of this code can be reached any more, so it can all be removed
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/entities.rb | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 494da770279..10b4f8934d7 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -1052,15 +1052,8 @@ module API # rubocop: disable CodeReuse/ActiveRecord def self.preload_relation(projects_relation, options = {}) relation = super(projects_relation, options) - - # MySQL doesn't support LIMIT inside an IN subquery - if Gitlab::Database.mysql? - project_ids = relation.pluck('projects.id') - namespace_ids = relation.pluck(:namespace_id) - else - project_ids = relation.select('projects.id') - namespace_ids = relation.select(:namespace_id) - end + project_ids = relation.select('projects.id') + namespace_ids = relation.select(:namespace_id) options[:project_members] = options[:current_user] .project_members |