summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2018-09-04 23:14:33 +0100
committerMatthew Hodgson <matthew@matrix.org>2018-09-04 23:14:33 +0100
commit7afd63cdfcd87c602ee43a3b239255cd067d986c (patch)
tree9b4cbc67ab6c50f198c7e89d2a7936aaa98b053c /synapse/storage
parentMerge pull request #3789 from matrix-org/neilj/improve_threepid_error_strings (diff)
downloadsynapse-7afd63cdfcd87c602ee43a3b239255cd067d986c.tar.xz
this will never have worked due to the query being split up into separate queries.
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/state.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/synapse/storage/state.py b/synapse/storage/state.py

index 4b971efdba..bca0630970 100644 --- a/synapse/storage/state.py +++ b/synapse/storage/state.py
@@ -189,12 +189,8 @@ class StateGroupWorkerStore(EventsWorkerStore, SQLBaseStore): if include_other_types: unique_types = set(filtered_types) - clause_to_args.append( - ( - "AND type <> ? " * len(unique_types), - list(unique_types) - ) - ) + sql += " AND type <> ? " * len(unique_types) + additional_args = list(unique_types) else: # If types is None we fetch all the state, and so just use an # empty where clause with no extra args. @@ -202,6 +198,7 @@ class StateGroupWorkerStore(EventsWorkerStore, SQLBaseStore): for where_clause, where_args in clause_to_args: args = [room_id] args.extend(where_args) + args.extend(additional_args) txn.execute(sql % (where_clause,), args) for row in txn: typ, state_key, event_id = row