summary refs log tree commit diff
path: root/synapse/storage/devices.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-01-27 10:31:29 +0000
committerErik Johnston <erik@matrix.org>2017-01-27 10:31:29 +0000
commit738a2867c8d6e8c97b956b6a58c7373a49e60ddb (patch)
treeee56640376456ff069f9281461cec50dd4bed5e6 /synapse/storage/devices.py
parentUser if rather than for (diff)
downloadsynapse-738a2867c8d6e8c97b956b6a58c7373a49e60ddb.tar.xz
SQL param ordering
Diffstat (limited to 'synapse/storage/devices.py')
-rw-r--r--synapse/storage/devices.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/storage/devices.py b/synapse/storage/devices.py
index ad5411dbe7..918520269e 100644
--- a/synapse/storage/devices.py
+++ b/synapse/storage/devices.py
@@ -260,7 +260,7 @@ class DeviceStore(SQLBaseStore):
                                    now_stream_id):
         sql = """
             SELECT user_id, device_id, max(stream_id) FROM device_lists_outbound_pokes
-            WHERE destination = ? AND stream_id > ? AND stream_id <= ? AND sent = ?
+            WHERE destination = ? AND ? < stream_id AND stream_id <= ? AND sent = ?
             GROUP BY user_id, device_id
         """
         txn.execute(