mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-23 01:55:53 +03:00
Fix sub-query selecting multiple rows
This commit is contained in:
parent
31300f4ce5
commit
339500d067
1 changed files with 2 additions and 3 deletions
|
@ -1998,7 +1998,7 @@ class EventsBackgroundUpdatesStore(StreamWorkerStore, StateDeltasStore, SQLBaseS
|
||||||
{("," + ", ".join(insert_keys)) if insert_keys else ""})
|
{("," + ", ".join(insert_keys)) if insert_keys else ""})
|
||||||
VALUES (
|
VALUES (
|
||||||
?, ?, ?, ?, ?,
|
?, ?, ?, ?, ?,
|
||||||
(SELECT forgotten FROM room_memberships WHERE room_id = ? AND user_id = ?),
|
(SELECT forgotten FROM room_memberships WHERE event_id = ?),
|
||||||
?
|
?
|
||||||
{("," + ", ".join("?" for _ in insert_values)) if insert_values else ""}
|
{("," + ", ".join("?" for _ in insert_values)) if insert_values else ""}
|
||||||
)
|
)
|
||||||
|
@ -2012,8 +2012,7 @@ class EventsBackgroundUpdatesStore(StreamWorkerStore, StateDeltasStore, SQLBaseS
|
||||||
sender,
|
sender,
|
||||||
membership_event_id,
|
membership_event_id,
|
||||||
membership,
|
membership,
|
||||||
room_id,
|
membership_event_id,
|
||||||
user_id,
|
|
||||||
membership_event_stream_ordering,
|
membership_event_stream_ordering,
|
||||||
]
|
]
|
||||||
+ list(insert_values),
|
+ list(insert_values),
|
||||||
|
|
Loading…
Reference in a new issue