From c4dcb824b120827723d157c17d7c1e37bfe8ee1b Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 30 May 2018 14:00:23 +0200 Subject: bin/seed-build-list: simplify "exists (select * from ...)" queries --- bin/seed-build-list | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bin/seed-build-list') diff --git a/bin/seed-build-list b/bin/seed-build-list index 809a5fd..df43ecf 100755 --- a/bin/seed-build-list +++ b/bin/seed-build-list @@ -371,16 +371,16 @@ printf 'CREATE TEMPORARY TABLE `pkgbases` (`pkgbase` VARCHAR(64), `repository` V fi if ${auto}; then printf 'EXISTS (' - printf 'SELECT * FROM `bin_ids`' + printf 'SELECT 1 FROM `bin_ids`' printf ' WHERE `bin_ids`.`id`=`binary_packages`.`id`' printf ')' printf ' OR ' fi printf 'EXISTS (' - printf 'SELECT * FROM `must_haves`' + printf 'SELECT 1 FROM `must_haves`' printf ' WHERE `must_haves`.`pkgname`=`binary_packages`.`pkgname`' printf ')) AND NOT EXISTS (' - printf 'SELECT * FROM `ignore_packages`' + printf 'SELECT 1 FROM `ignore_packages`' printf ' WHERE `ignore_packages`.`pkgname`=`binary_packages`.`pkgname`' printf ');\n' } | \ -- cgit v1.2.3-70-g09d2