Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/get-assignment
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-07-06 21:51:49 +0200
committerErich Eckner <git@eckner.net>2019-07-06 21:51:49 +0200
commitffe16b27cc7a8af56837c437943cdec5dc179e68 (patch)
treeebfc9869c5c92979e66fdda8dfa92060bdb3463a /bin/get-assignment
parente56d90e08f49b89cd9636dc0212f7e53cd938aa8 (diff)
bin/get-assignment: accellerate query (?) by using temporary table instead of "WHERE EXISTS (SELECT ...)"
Diffstat (limited to 'bin/get-assignment')
-rwxr-xr-xbin/get-assignment8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/get-assignment b/bin/get-assignment
index 9dcb600..44cfe66 100755
--- a/bin/get-assignment
+++ b/bin/get-assignment
@@ -219,6 +219,8 @@ next_building=$(
printf ');\n'
done
+ mysql_query_generate_packages_with_pending_dependencies
+
printf 'INSERT IGNORE INTO `considered_build_assignments` (`id`)'
printf ' SELECT `build_assignments`.`id`'
printf ' FROM `build_assignments`'
@@ -240,6 +242,9 @@ next_building=$(
printf ')'
printf ' LEFT'
mysql_join_package_sources_toolchain_order
+ printf ' LEFT JOIN `packages_with_pending_dependencies`'
+ printf ' ON `packages_with_pending_dependencies`.`builder_architecture`=`build_command_architectures`.`id`'
+ printf ' AND `packages_with_pending_dependencies`.`build_assignment`=`build_assignments`.`id`'
printf ' WHERE ('
printf '`build_assignments`.`is_blocked` IS NULL'
if [ -n "${requested}" ]; then
@@ -249,8 +254,7 @@ next_building=$(
fi
printf ') AND ('
mysql_query_is_part_of_loop '`build_assignments`.`id`'
- printf ' OR NOT '
- mysql_query_has_pending_dependencies '`build_command_architectures`.`id`' '`build_assignments`.`id`'
+ printf ' OR `packages_with_pending_dependencies`.`build_assignment` IS NULL'
printf ' OR `toolchain_order`.`pkgbase` IS NOT NULL'
printf ')'
printf ' AND `binary_packages_in_repositories`.`repository`=%s' \