summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2018-05-01 17:54:03 +0100
committerDavid Baker <dave@matrix.org>2018-05-01 17:54:03 +0100
commit3a62cacfb0e8832ef01aadabb29452fa0308ebdc (patch)
tree335a718ca1a3d2c7e0cc8d62ebedfac51b2d0743
parentFix python synatx (diff)
downloadsynapse-3a62cacfb0e8832ef01aadabb29452fa0308ebdc.tar.xz
Use COALESCE rather than IFNULL
as this works on sqlite and postgres (postgres doesn't have IFNULL)
-rw-r--r--synapse/storage/profile.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/storage/profile.py b/synapse/storage/profile.py

index 12e2d44406..fcf3af7e5b 100644 --- a/synapse/storage/profile.py +++ b/synapse/storage/profile.py
@@ -88,7 +88,7 @@ class ProfileWorkerStore(SQLBaseStore): def f(txn): sql = ( "UPDATE profiles SET batch = " - "(SELECT IFNULL(MAX(batch), -1) + 1 FROM profiles) " + "(SELECT COALESCE(MAX(batch), -1) + 1 FROM profiles) " "WHERE user_id in (" " SELECT user_id FROM profiles WHERE batch is NULL limit ?" ")"