summary refs log tree commit diff
path: root/synapse/storage/search.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2018-04-27 12:54:43 +0100
committerRichard van der Hoff <richard@matrix.org>2018-04-27 12:54:43 +0100
commit3d1ae6139918ecb013c576a5eb0ed8e06103ebf6 (patch)
tree5056d9455cb6a0d72da1dc2b5dcf1a98c6282c6e /synapse/storage/search.py
parentBackport deferred.addTimeout (diff)
parentMerge pull request #3134 from matrix-org/erikj/fix_admin_media_api (diff)
downloadsynapse-3d1ae6139918ecb013c576a5eb0ed8e06103ebf6.tar.xz
Merge branch 'develop' into rav/deferred_timeout
Diffstat (limited to 'synapse/storage/search.py')
-rw-r--r--synapse/storage/search.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/storage/search.py b/synapse/storage/search.py
index 426cbe6e1a..6ba3e59889 100644
--- a/synapse/storage/search.py
+++ b/synapse/storage/search.py
@@ -77,7 +77,7 @@ class SearchStore(BackgroundUpdateStore):
             sql = (
                 "SELECT stream_ordering, event_id, room_id, type, json, "
                 " origin_server_ts FROM events"
-                " JOIN event_json USING (event_id)"
+                " JOIN event_json USING (room_id, event_id)"
                 " WHERE ? <= stream_ordering AND stream_ordering < ?"
                 " AND (%s)"
                 " ORDER BY stream_ordering DESC"