From 376313e40bf44350360af04b82b8e72d95b18c4a Mon Sep 17 00:00:00 2001 From: Nick Mills-Barrett Date: Wed, 8 Nov 2023 16:19:05 +0000 Subject: [PATCH] Add missing `txn.execute` on `FOR UPDATE` statement --- synapse/storage/databases/main/push_rule.py | 1 + 1 file changed, 1 insertion(+) diff --git a/synapse/storage/databases/main/push_rule.py b/synapse/storage/databases/main/push_rule.py index a9ce6cf220a4..543890319a4e 100644 --- a/synapse/storage/databases/main/push_rule.py +++ b/synapse/storage/databases/main/push_rule.py @@ -514,6 +514,7 @@ def _add_push_rule_highest_priority_txn( WHERE user_name = ? and priority_class = ? FOR UPDATE """ + txn.execute(sql, (user_id, priority_class)) else: # Annoyingly SQLite doesn't support row level locking, so lock the whole table self.database_engine.lock_table(txn, "push_rules")