summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-11-26 15:17:40 +0000
committerErik Johnston <erik@matrix.org>2014-11-26 15:17:40 +0000
commit516deb22aa4d3a8fc236dd285faf2596fd12fe1f (patch)
tree783ce29245c09c807e065428ca9b3dc1f6fddc82 /synapse
parentMerge branch 'release-v0.5.1' of github.com:matrix-org/synapse (diff)
parentDon't delete the entire current_state_events table (diff)
downloadsynapse-516deb22aa4d3a8fc236dd285faf2596fd12fe1f.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse
Diffstat (limited to 'synapse')
-rw-r--r--synapse/storage/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py
index 1fb33171e8..f15e3dfe62 100644
--- a/synapse/storage/__init__.py
+++ b/synapse/storage/__init__.py
@@ -209,7 +209,10 @@ class DataStore(RoomMemberStore, RoomStore,
         self._store_state_groups_txn(txn, event)
 
         if current_state:
-            txn.execute("DELETE FROM current_state_events")
+            txn.execute(
+                "DELETE FROM current_state_events WHERE room_id = ?",
+                (event.room_id,)
+            )
 
             for s in current_state:
                 self._simple_insert_txn(