mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Prevent "integer out of range" when merging post timings (#15723)
This commit is contained in:
@@ -118,7 +118,7 @@ class UserMerger
|
||||
"x.post_number = y.post_number"])
|
||||
sql = <<~SQL
|
||||
UPDATE post_timings AS t
|
||||
SET msecs = t.msecs + s.msecs
|
||||
SET msecs = LEAST(t.msecs::bigint + s.msecs, 2^31 - 1)
|
||||
FROM post_timings AS s
|
||||
WHERE t.user_id = :target_user_id AND s.user_id = :source_user_id
|
||||
AND t.topic_id = s.topic_id AND t.post_number = s.post_number
|
||||
|
||||
Reference in New Issue
Block a user