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:
parent
14bd57eb47
commit
b8c94d93e9
|
@ -443,7 +443,7 @@ module CollectiveIdea #:nodoc:
|
||||||
in_tenacious_transaction do
|
in_tenacious_transaction do
|
||||||
reload_nested_set
|
reload_nested_set
|
||||||
# select the rows in the model that extend past the deletion point and apply a lock
|
# 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").
|
select("id").
|
||||||
where("#{quoted_left_column_name} >= ?", left).
|
where("#{quoted_left_column_name} >= ?", left).
|
||||||
lock(true).
|
lock(true).
|
||||||
|
|
Loading…
Reference in New Issue