mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-06 14:48:56 +01:00
Limit max number of SQL vars
This commit is contained in:
parent
1fc2d11a14
commit
ba02bba88c
1 changed files with 6 additions and 4 deletions
|
@ -36,6 +36,8 @@ class SearchStore(SQLBaseStore):
|
||||||
clauses = []
|
clauses = []
|
||||||
args = []
|
args = []
|
||||||
|
|
||||||
|
# Make sure we don't explode because the person is in too many rooms.
|
||||||
|
if len(room_ids) > 500:
|
||||||
clauses.append(
|
clauses.append(
|
||||||
"room_id IN (%s)" % (",".join(["?"] * len(room_ids)),)
|
"room_id IN (%s)" % (",".join(["?"] * len(room_ids)),)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue