Use correct table

This commit is contained in:
Eric Eastwood 2024-09-10 14:00:34 -05:00
parent 76cc6629de
commit 2e8f5d66da

View file

@ -1993,7 +1993,7 @@ class EventsBackgroundUpdatesStore(StreamWorkerStore, StateDeltasStore, SQLBaseS
INNER JOIN events AS e USING (event_id)
LEFT JOIN rooms AS r ON (c.room_id = r.room_id)
WHERE (c.room_id, c.user_id) > (?, ?)
ORDER BY c.room_id ASC, c.stream_ordering ASC, c.user_id ASC
ORDER BY c.room_id ASC, e.stream_ordering ASC, c.user_id ASC
LIMIT ?
""",
(last_room_id, last_user_id, batch_size),