From 67a39cadbb476515f847e63eba9b121e65eb97b1 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Tue, 4 Aug 2015 17:15:14 +0100 Subject: [PATCH] lib/Odin.pm: Alter `redir_query' to break ties by local part. Otherwise the order is unstable across database modifications, at least with PostgreSQL. --- lib/Odin.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ($) { -- 2.11.0