Skip to content
Snippets Groups Projects
Unverified Commit f10caa73 authored by David Robertson's avatar David Robertson
Browse files

Disambiguate `get_ex_outlier_stream_rows` query

A backwards-compatible piece of #14979 that's safe to land now.
parent 9cd7610f
No related branches found
No related tags found
No related merge requests found
......@@ -1779,7 +1779,7 @@ class EventsWorkerStore(SQLBaseStore):
txn: LoggingTransaction,
) -> List[Tuple[int, str, str, str, str, str, str, str, bool, bool]]:
sql = (
"SELECT event_stream_ordering, e.event_id, e.room_id, e.type,"
"SELECT out.event_stream_ordering, e.event_id, e.room_id, e.type,"
" se.state_key, redacts, relates_to_id, membership, rejections.reason IS NOT NULL,"
" e.outlier"
" FROM events AS e"
......@@ -1791,10 +1791,10 @@ class EventsWorkerStore(SQLBaseStore):
" LEFT JOIN event_relations USING (event_id)"
" LEFT JOIN room_memberships USING (event_id)"
" LEFT JOIN rejections USING (event_id)"
" WHERE ? < event_stream_ordering"
" AND event_stream_ordering <= ?"
" WHERE ? < out.event_stream_ordering"
" AND out.event_stream_ordering <= ?"
" AND out.instance_name = ?"
" ORDER BY event_stream_ordering ASC"
" ORDER BY out.event_stream_ordering ASC"
)
txn.execute(sql, (last_id, current_id, instance_name))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment