summary refs log tree commit diff
path: root/synapse/storage/databases/main/events.py
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2021-12-02 22:42:58 +0000
committerGitHub <noreply@github.com>2021-12-02 22:42:58 +0000
commit5640992d176a499204a0756b1677c9b1575b0a49 (patch)
treeef3c2d1f709ba1ad9c236a6cef8b7ab758ed49ee /synapse/storage/databases/main/events.py
parentComments on the /sync tentacles (#11494) (diff)
downloadsynapse-5640992d176a499204a0756b1677c9b1575b0a49.tar.xz
Disambiguate queries on `state_key` (#11497)
We're going to add a `state_key` column to the `events` table, so we need to
add some disambiguation to queries which use it.
Diffstat (limited to 'synapse/storage/databases/main/events.py')
-rw-r--r--synapse/storage/databases/main/events.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/databases/main/events.py b/synapse/storage/databases/main/events.py
index 4171b904eb..4e528612ea 100644
--- a/synapse/storage/databases/main/events.py
+++ b/synapse/storage/databases/main/events.py
@@ -575,9 +575,9 @@ class PersistEventsStore:
         # fetch their auth event info.
         while missing_auth_chains:
             sql = """
-                SELECT event_id, events.type, state_key, chain_id, sequence_number
+                SELECT event_id, events.type, se.state_key, chain_id, sequence_number
                 FROM events
-                INNER JOIN state_events USING (event_id)
+                INNER JOIN state_events AS se USING (event_id)
                 LEFT JOIN event_auth_chains USING (event_id)
                 WHERE
             """