From 20ba272ee51a1deb4b5f2afc76bdcf019f629082 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 12 Sep 2019 11:55:04 +0200 Subject: bin/return-assignment: LIMIT 1 instead of SELECT DISTINCT --- bin/return-assignment | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bin/return-assignment') diff --git a/bin/return-assignment b/bin/return-assignment index 3e62003..5bf4c51 100755 --- a/bin/return-assignment +++ b/bin/return-assignment @@ -100,7 +100,7 @@ if [ "$6" = 'ERROR' ]; then # shellcheck disable=SC2016 infos=$( { - printf 'SELECT DISTINCT' + printf 'SELECT' printf ' `build_assignments`.`id`,' printf 'IF(`build_assignments`.`is_broken`,"true","false"),' printf '`ba_a`.`name`' @@ -130,8 +130,9 @@ if [ "$6" = 'ERROR' ]; then "$(printf '%s' "$4" | base64 -w0)" printf ' AND `architectures`.`name`=from_base64("%s")' \ "$(printf '%s' "$5" | base64 -w0)" - printf ' AND `binary_packages_in_repositories`.`repository`=%s;\n' \ + printf ' AND `binary_packages_in_repositories`.`repository`=%s' \ "${repository_ids__any_build_list}" + printf ' LIMIT 1;\n' } | \ mysql_run_query | \ tr '\t' ' ' -- cgit v1.2.3-54-g00ecf