mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
Merge pull request #289 from matrix-org/markjh/fix_sql
Fix order of ON constraints in _get_rooms_for_user_where_membership
This commit is contained in:
commit
17795161c3
@ -142,12 +142,12 @@ class RoomMemberStore(SQLBaseStore):
|
||||
|
||||
sql = (
|
||||
"SELECT m.room_id, m.sender, m.membership, m.event_id, e.stream_ordering"
|
||||
" FROM room_memberships as m"
|
||||
" INNER JOIN current_state_events as c"
|
||||
" ON e.event_id = c.event_id "
|
||||
" INNER JOIN events as e "
|
||||
" ON m.event_id = c.event_id "
|
||||
" AND m.room_id = c.room_id "
|
||||
" FROM current_state_events as c"
|
||||
" INNER JOIN room_memberships as m"
|
||||
" ON m.event_id = c.event_id"
|
||||
" INNER JOIN events as e"
|
||||
" ON e.event_id = c.event_id"
|
||||
" AND m.room_id = c.room_id"
|
||||
" AND m.user_id = c.state_key"
|
||||
" WHERE %s"
|
||||
) % (where_clause,)
|
||||
|
Loading…
Reference in New Issue
Block a user