Fixed slow SELECT ... FOR UPDATE query when deleting an issue.

git-svn-id: http://svn.redmine.org/redmine/trunk@12445 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2013-12-22 15:49:53 +00:00
parent 14bd57eb47
commit b8c94d93e9
1 changed files with 1 additions and 1 deletions

View File

@ -443,7 +443,7 @@ module CollectiveIdea #:nodoc:
in_tenacious_transaction do
reload_nested_set
# select the rows in the model that extend past the deletion point and apply a lock
self.class.base_class.
nested_set_scope.
select("id").
where("#{quoted_left_column_name} >= ?", left).
lock(true).