-
- Downloads
Remove redundant `COALESCE()`s around `COUNT()`s in database queries (#11570)
`COUNT()` never returns `NULL`. A `COUNT(*)` over 0 rows is 0 and a `COUNT(NULL)` is also 0.
Showing
- changelog.d/11570.misc 1 addition, 0 deletionschangelog.d/11570.misc
- synapse/storage/databases/main/event_federation.py 2 additions, 4 deletionssynapse/storage/databases/main/event_federation.py
- synapse/storage/databases/main/metrics.py 9 additions, 9 deletionssynapse/storage/databases/main/metrics.py
- synapse/storage/databases/main/monthly_active_users.py 2 additions, 2 deletionssynapse/storage/databases/main/monthly_active_users.py
- synapse/storage/databases/main/registration.py 2 additions, 2 deletionssynapse/storage/databases/main/registration.py
- synapse/storage/databases/main/relations.py 1 addition, 1 deletionsynapse/storage/databases/main/relations.py
- synapse/storage/databases/main/room.py 1 addition, 1 deletionsynapse/storage/databases/main/room.py
- synapse/storage/databases/main/stats.py 1 addition, 1 deletionsynapse/storage/databases/main/stats.py
- tests/storage/test_event_federation.py 1 addition, 1 deletiontests/storage/test_event_federation.py
Loading
Please register or sign in to comment