From cc67484d4e61b2787fdf6d25849df69b84cb24e2 Mon Sep 17 00:00:00 2001 From: Ximin Luo Date: Tue, 7 Jun 2016 15:02:09 +0200 Subject: Fix get_bugs - don't join on the same table twice, also remove redundant join against "sources" Signed-off-by: Holger Levsen --- bin/reproducible_common.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bin/reproducible_common.py b/bin/reproducible_common.py index 2eb7389b..368aed5e 100755 --- a/bin/reproducible_common.py +++ b/bin/reproducible_common.py @@ -568,9 +568,7 @@ def get_bugs(): """ query = """ SELECT bugs.id, bugs.source, bugs.done, ARRAY_AGG(tags.tag) - FROM bugs JOIN bugs_tags ON bugs.id = bugs_tags.id - JOIN bugs_usertags ON bugs_tags.id = bugs_usertags.id - JOIN sources ON bugs.source=sources.source + FROM bugs JOIN bugs_usertags ON bugs.id = bugs_usertags.id LEFT JOIN ( SELECT id, tag FROM bugs_tags WHERE tag='patch' OR tag='pending' -- cgit v1.2.3-70-g09d2