From: Mark Wooding Date: Tue, 4 Aug 2015 16:15:14 +0000 (+0100) Subject: lib/Odin.pm: Alter `redir_query' to break ties by local part. X-Git-Url: https://git.distorted.org.uk/~mdw/odin-cgi/commitdiff_plain/67a39cadbb476515f847e63eba9b121e65eb97b1 lib/Odin.pm: Alter `redir_query' to break ties by local part. Otherwise the order is unstable across database modifications, at least with PostgreSQL. --- diff --git a/lib/Odin.pm b/lib/Odin.pm index b91eb96..a742839 100644 --- a/lib/Odin.pm +++ b/lib/Odin.pm @@ -501,7 +501,7 @@ sub redir_query ($$$;$@) { ("SELECT lpart, expire, recip, comment FROM odin_mailredir WHERE dom = ? AND owner = ?" . (defined $cond ? " AND $cond" : "") . " " . - "ORDER BY expire", undef, $dom, $owner, @args)}; + "ORDER BY expire, lpart", undef, $dom, $owner, @args)}; } sub clear_redir_reservations ($) {