summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-12-22 15:49:53 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-12-22 15:49:53 +0000
commitb8c94d93e9512e3b394f2765aa901bf01a8ad465 (patch)
tree0da77db2f161e27777ace04e4b806ac4b38d8738 /lib
parent14bd57eb4772fa1c0cb7d45d9caea18ad3aa2250 (diff)
downloadredmine-b8c94d93e9512e3b394f2765aa901bf01a8ad465.tar.gz
redmine-b8c94d93e9512e3b394f2765aa901bf01a8ad465.zip
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
Diffstat (limited to 'lib')
-rw-r--r--lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb b/lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb
index 7f0b23197..f55e62603 100644
--- a/lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb
+++ b/lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb
@@ -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).