summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-05-30 14:00:23 +0200
committerErich Eckner <git@eckner.net>2018-05-30 14:00:23 +0200
commitc4dcb824b120827723d157c17d7c1e37bfe8ee1b (patch)
tree2b9497d2cb0eb06b6e51a40b9626559af840a4b5
parentadefb526e8965475ef593f68de3b7749a822200a (diff)
downloadbuilder-c4dcb824b120827723d157c17d7c1e37bfe8ee1b.tar.xz
bin/seed-build-list: simplify "exists (select * from ...)" queries
-rwxr-xr-xbin/seed-build-list6
1 files changed, 3 insertions, 3 deletions
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'
} | \