Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-09-12 11:55:04 +0200
committerErich Eckner <git@eckner.net>2019-09-12 11:55:04 +0200
commit20ba272ee51a1deb4b5f2afc76bdcf019f629082 (patch)
tree1b9932dc0a29204348ecd17acce433e487cf5d86
parent9db831a935d6c8303160424ce8c270c296450da9 (diff)
bin/return-assignment: LIMIT 1 instead of SELECT DISTINCT
-rwxr-xr-xbin/return-assignment5
1 files changed, 3 insertions, 2 deletions
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' ' '