summary refs log tree commit diff
path: root/synapse/storage/__init__.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-09-25 15:51:21 +0100
committerErik Johnston <erik@matrix.org>2014-09-25 15:51:21 +0100
commitc818aa13eb47c9d30da26645850a2af2672edf68 (patch)
tree891724e680cb6343de4a4d948ca5795d122cf842 /synapse/storage/__init__.py
parentMore tests. (diff)
downloadsynapse-c818aa13eb47c9d30da26645850a2af2672edf68.tar.xz
Add LIMIT to scalar subquery
Diffstat (limited to 'synapse/storage/__init__.py')
-rw-r--r--synapse/storage/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py
index fcf8b4d183..38f5ec0ac5 100644
--- a/synapse/storage/__init__.py
+++ b/synapse/storage/__init__.py
@@ -255,7 +255,8 @@ class DataStore(RoomMemberStore, RoomStore,
     @defer.inlineCallbacks
     def get_current_state(self, room_id, event_type=None, state_key=""):
         del_sql = (
-            "SELECT event_id FROM redactions WHERE redacts = e.event_id"
+            "SELECT event_id FROM redactions WHERE redacts = e.event_id "
+            "LIMIT 1"
         )
 
         sql = (