diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-09-24 17:34:02 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-09-24 17:35:10 +0100 |
commit | cf1100887b454535e25dfeb67d649c2a4673eab7 (patch) | |
tree | cb1cfd541407bf564c315f86fa1b9d22779472e5 | |
parent | Merge pull request #286 from matrix-org/markjh/stream_config_repr (diff) | |
download | synapse-cf1100887b454535e25dfeb67d649c2a4673eab7.tar.xz |
Fix order of ON constraints in _get_rooms_for_user_where_membership_is_txn
-rw-r--r-- | synapse/storage/roommember.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/synapse/storage/roommember.py b/synapse/storage/roommember.py index cd9eefbd9f..41c939efb1 100644 --- a/synapse/storage/roommember.py +++ b/synapse/storage/roommember.py @@ -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,) |