提交 4b0e82d3 编写于 作者: J Joerg Jaspert

Merge remote-tracking branch 'ansgar/rm' into merge

* ansgar/rm:
  Use WITH statement instead of a temporary table
Signed-off-by: NJoerg Jaspert <joerg@debian.org>
......@@ -126,16 +126,11 @@ def reverse_depends_check(removals, suite, arches=None, session=None):
params['arch_id'] = get_architecture(architecture, session).arch_id
statement = '''
create temp table suite_binaries (
id integer primary key,
package text,
source integer,
file integer);
insert into suite_binaries
select b.id, b.package, b.source, b.file
WITH suite_binaries AS
(select b.id, b.package, b.source, b.file
from binaries b WHERE b.id in
(SELECT bin FROM bin_associations WHERE suite = :suite_id)
AND b.architecture in (:arch_id, :arch_all_id);
AND b.architecture in (:arch_id, :arch_all_id))
SELECT b.id, b.package, s.source, c.name as component,
bmd.value as depends, bmp.value as provides
FROM suite_binaries b
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册