Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Remove mysql-specific reference

Oliver Güntherddce9725cb3b
diff --git a/app/controllers/work_packages/auto_completes_controller.rb b/app/controllers/work_packages/auto_completes_controller.rb
index 93a972290d1..620aee28245 100644
--- a/app/controllers/work_packages/auto_completes_controller.rb
+++ b/app/controllers/work_packages/auto_completes_controller.rb
@@ -81,19 +81,6 @@ class WorkPackages::AutoCompletesController < ::ApplicationController
end
def work_package_scope
- scope = WorkPackage.all
-
- # The filter on subject in combination with the ORDER BY on id
- # seems to trip MySql's usage of indexes on the order statement
- # I haven't seen similar problems on postgresql but there might be as the
- # data at hand was not very large.
- #
- # For MySql we are therefore helping the DB optimizer to use the correct index
-
- if ActiveRecord::Base.connection_config[:adapter] == 'mysql2'
- scope = scope.from("#{WorkPackage.table_name} USE INDEX(PRIMARY)")
- end
-
- scope
+ WorkPackage.all
end
end