From 258ca5e76f4c66976b363a00d7bef40d4bd6f277 Mon Sep 17 00:00:00 2001 From: James Troup Date: Thu, 29 Aug 2002 22:56:29 +0000 Subject: [PATCH] Fix performance degradation from brain dead SQL query. --- melanie | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/melanie b/melanie index 5d0efde9..4042ef19 100755 --- a/melanie +++ b/melanie @@ -2,7 +2,7 @@ # General purpose package removal tool for ftpmaster # Copyright (C) 2000, 2001, 2002 James Troup -# $Id: melanie,v 1.29 2002-07-30 18:55:19 troup Exp $ +# $Id: melanie,v 1.30 2002-08-29 22:56:29 troup Exp $ # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -218,7 +218,7 @@ def main (): # Source + Binary binary_packages = {}; # First get a list of binary package names we suspect are linked to the source - q = projectB.query("SELECT DISTINCT package FROM binaries WHERE EXISTS (SELECT s.source, s.version, l.path, f.filename FROM source s, src_associations sa, suite su, files f, location l, component c WHERE binaries.source = s.id AND sa.source = s.id AND sa.suite = su.id AND s.file = f.id AND f.location = l.id AND l.component = c.id %s %s %s)" % (con_packages, con_suites, con_components)); + q = projectB.query("SELECT DISTINCT b.package FROM binaries b, source s, src_associations sa, suite su, files f, location l, component c WHERE b.source = s.id AND sa.source = s.id AND sa.suite = su.id AND s.file = f.id AND f.location = l.id AND l.component = c.id %s %s %s" % (con_packages, con_suites, con_components)); for i in q.getresult(): binary_packages[i[0]] = ""; # Then parse each .dsc that we found earlier to see what binary packages it thinks it produces @@ -368,7 +368,7 @@ def main (): Subst["__BCC__"] = "Bcc: " + string.join(bcc, ", "); else: Subst["__BCC__"] = "X-Filler: 42"; - Subst["__CC__"] = "X-Melanie: $Revision: 1.29 $"; + Subst["__CC__"] = "X-Melanie: $Revision: 1.30 $"; if carbon_copy: Subst["__CC__"] = Subst["__CC__"] + "\nCc: " + string.join(carbon_copy, ", "); Subst["__SUITE_LIST__"] = suites_list; -- 2.39.2