From b8c94d93e9512e3b394f2765aa901bf01a8ad465 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 22 Dec 2013 15:49:53 +0000 Subject: [PATCH] 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 --- .../lib/awesome_nested_set/awesome_nested_set.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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). -- 2.39.5