diff options
author | Erik Johnston <erik@matrix.org> | 2015-02-12 15:24:06 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-02-12 15:24:06 +0000 |
commit | 92d850fc874aa5c77659adb6b5d38a99f989f0b5 (patch) | |
tree | 64f05ff96a9a1bb60374ea803d921f5256903e51 | |
parent | Merge branch 'release-v0.7.0' of github.com:matrix-org/synapse (diff) | |
parent | Merge pull request #69 from matrix-org/hotfixes-v0.7.0a (diff) | |
download | synapse-92d850fc874aa5c77659adb6b5d38a99f989f0b5.tar.xz |
Merge branch 'master' of github.com:matrix-org/synapse into develop
Diffstat (limited to '')
-rw-r--r-- | synapse/__init__.py | 2 | ||||
-rw-r--r-- | synapse/storage/event_federation.py | 13 |
2 files changed, 7 insertions, 8 deletions
diff --git a/synapse/__init__.py b/synapse/__init__.py index 915af3fe09..10147d88dc 100644 --- a/synapse/__init__.py +++ b/synapse/__init__.py @@ -16,4 +16,4 @@ """ This is a reference implementation of a Matrix home server. """ -__version__ = "0.7.0" +__version__ = "0.7.0a" diff --git a/synapse/storage/event_federation.py b/synapse/storage/event_federation.py index 0cbcdd1b55..3fbc090224 100644 --- a/synapse/storage/event_federation.py +++ b/synapse/storage/event_federation.py @@ -55,17 +55,16 @@ class EventFederationStore(SQLBaseStore): results = set() base_sql = ( - "SELECT auth_id FROM event_auth WHERE %s" + "SELECT auth_id FROM event_auth WHERE event_id = ?" ) front = set(event_ids) while front: - sql = base_sql % ( - " OR ".join(["event_id=?"] * len(front)), - ) - - txn.execute(sql, list(front)) - front = [r[0] for r in txn.fetchall()] + new_front = set() + for f in front: + txn.execute(base_sql, (f,)) + new_front.update([r[0] for r in txn.fetchall()]) + front = new_front results.update(front) return list(results) |