summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-02-13 15:21:31 +0100
committerErich Eckner <git@eckner.net>2018-02-13 15:21:31 +0100
commit5b40c2766152357f448e1c425ae999d2f3d244d7 (patch)
treec535c1bc8f889bec3887689f7b0958145d02e980
parent2782ca1872ca1276df85f5a039418d1f472e103a (diff)
downloadbuilder-5b40c2766152357f448e1c425ae999d2f3d244d7.tar.xz
bin/mysql-functions: bugfix in mysql_cleanup
-rwxr-xr-xbin/mysql-functions8
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/mysql-functions b/bin/mysql-functions
index 241c84b..1cd68cf 100755
--- a/bin/mysql-functions
+++ b/bin/mysql-functions
@@ -793,9 +793,11 @@ mysql_cleanup() {
# remove failed_builds with unbroken build_assignments
printf '%s FROM `failed_builds` ' \
"${operator}"
- printf 'JOIN `build_assignments` '
- printf 'ON `failed_builds`.`build_assignment`=`build_assignments`.`id` '
- printf 'WHERE NOT `build_assignments`.`is_broken`;\n'
+ printf 'WHERE ('
+ printf 'SELECT NOT `build_assignments`.`is_broken`'
+ printf ' FROM `build_assignments` '
+ printf ' WHERE `failed_builds`.`build_assignment`=`build_assignments`.`id`'
+ printf ');\n'
# remove failed_builds w/o build_assignment
printf '%s FROM `failed_builds` ' \
"${operator}"