mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-19 12:04:20 -05:00
Limit max number of SQL vars
This commit is contained in:
parent
1fc2d11a14
commit
ba02bba88c
@ -36,10 +36,12 @@ class SearchStore(SQLBaseStore):
|
||||
clauses = []
|
||||
args = []
|
||||
|
||||
clauses.append(
|
||||
"room_id IN (%s)" % (",".join(["?"] * len(room_ids)),)
|
||||
)
|
||||
args.extend(room_ids)
|
||||
# Make sure we don't explode because the person is in too many rooms.
|
||||
if len(room_ids) > 500:
|
||||
clauses.append(
|
||||
"room_id IN (%s)" % (",".join(["?"] * len(room_ids)),)
|
||||
)
|
||||
args.extend(room_ids)
|
||||
|
||||
local_clauses = []
|
||||
for key in keys:
|
||||
|
Loading…
Reference in New Issue
Block a user