summary refs log tree commit diff
path: root/synapse/storage/__init__.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-01-29 14:42:01 +0000
committerErik Johnston <erik@matrix.org>2016-01-29 14:42:01 +0000
commit45488e0ffae5100c3a82568642736aff203e1602 (patch)
treeed3fa7155ad62da81ce66635607d0db694980783 /synapse/storage/__init__.py
parentConvert param style (diff)
downloadsynapse-45488e0ffae5100c3a82568642736aff203e1602.tar.xz
Max is not a function
Diffstat (limited to 'synapse/storage/__init__.py')
-rw-r--r--synapse/storage/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py
index 2ed505cb1e..4d374a8b07 100644
--- a/synapse/storage/__init__.py
+++ b/synapse/storage/__init__.py
@@ -148,7 +148,7 @@ class DataStore(RoomMemberStore, RoomStore,
     def _get_cache_dict(self, db_conn, table, entity_column, stream_column, max_value):
         sql = (
             "SELECT %(entity)s, MAX(%(stream)s) FROM %(table)s"
-            " WHERE %(stream)s > max(? - 100000, 0)"
+            " WHERE %(stream)s > ? - 100000"
             " GROUP BY %(entity)s"
             " ORDER BY MAX(%(stream)s) DESC"
             " LIMIT 10000"