From 9e1d3f119a7f80cf068d42ec2a55a1f40ff0c6d2 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Wed, 30 May 2018 11:45:58 +0100 Subject: [PATCH] Remove unnecessary COALESCE --- synapse/storage/events.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/synapse/storage/events.py b/synapse/storage/events.py index da053f0b18..cab5c18637 100644 --- a/synapse/storage/events.py +++ b/synapse/storage/events.py @@ -1456,7 +1456,7 @@ class EventsStore(EventsWorkerStore): "room_id": room_id, "chunk_id": chunk_id, }, - retcol="COALESCE(MAX(topological_ordering), 0)", + retcol="MAX(topological_ordering)", ) new_topo += 1 @@ -1473,7 +1473,7 @@ class EventsStore(EventsWorkerStore): "room_id": room_id, "chunk_id": chunk_id, }, - retcol="COALESCE(MIN(topological_ordering), 0)", + retcol="MIN(topological_ordering)", ) new_topo -= 1 else: