A platform for community discussion. Free, open, simple.
This commit fixes an undesirable geometric query memory usage introduced in b908abe35a0121e7df69ab3bbced259b6a2b7104 (#29539)
pgcd725d2411e5e7
diff --git a/app/models/topic.rb b/app/models/topic.rbindex d796b3c895f..f17c7eecf53 100644--- a/app/models/topic.rb+++ b/app/models/topic.rb@@ -881,7 +881,8 @@ class Topic < ActiveRecord::BaseWHEREtopics.archetype <> 'private_message' ANDX.topic_id = topics.id AND- Y.topic_id = topics.id AND (+ Y.topic_id = topics.id AND+ Z.topic_id = topics.id AND (topics.highest_staff_post_number <> X.highest_post_number ORtopics.highest_post_number <> Y.highest_post_number ORtopics.last_posted_at <> Y.last_posted_at OR@@ -926,7 +927,8 @@ class Topic < ActiveRecord::BaseWHEREtopics.archetype = 'private_message' ANDX.topic_id = topics.id AND- Y.topic_id = topics.id AND (+ Y.topic_id = topics.id AND+ Z.topic_id = topics.id AND (topics.highest_staff_post_number <> X.highest_post_number ORtopics.highest_post_number <> Y.highest_post_number ORtopics.last_posted_at <> Y.last_posted_at OR