Commit 795bd4c
committed
SIP Trace: Improve "group by Call-ID" query
* be compatible with any SQL mode. This fixes:
SELECT DISTINCT callid FROM sip_trace WHERE status='' AND
direction='in' ORDER BY id DESC;
ERROR 3065 (HY000): Expression #1 of ORDER BY clause is not in
SELECT list, references column 'opensips.sip_trace.id' which
is not in SELECT list; this is incompatible with DISTINCT
* be consistent across different backends (e.g. don't sort the
results differently with MySQL vs. Postgres)
Fixes #83
(cherry picked from commit e2c4246)1 parent 0a700c7 commit 795bd4c
1 file changed
+2
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
| 137 | + | |
| 138 | + | |
142 | 139 | | |
143 | 140 | | |
144 | 141 | | |
| |||
0 commit comments