]> source.dussan.org Git - redmine.git/commitdiff
Fixed slow SELECT ... FOR UPDATE query when deleting an issue.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 22 Dec 2013 15:49:53 +0000 (15:49 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 22 Dec 2013 15:49:53 +0000 (15:49 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@12445 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb

index 7f0b23197dc1342e3a0d1ddf0b1837ab76267aa7..f55e62603259d03dae175a1956a8469dbea87875 100644 (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).