From e0c167a65916bf995add39aec94f5f524af834e4 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 1 Jun 2018 11:06:41 +0200 Subject: make `binary_packages`.`is_to_be_deleted` and `binary_packages`.`last_moved` obsolete; cleanup some queries --- lib/mysql-functions | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'lib/mysql-functions') diff --git a/lib/mysql-functions b/lib/mysql-functions index 8dc37b1..cb76dac 100755 --- a/lib/mysql-functions +++ b/lib/mysql-functions @@ -455,8 +455,7 @@ mysql_generate_package_metadata() { 'pkgname' \ 'sub_pkgrel' \ 'has_issues' \ - 'is_tested' \ - 'is_to_be_deleted' + 'is_tested' printf ') SELECT ' printf '%s,' \ "${build_assignment_id}" @@ -467,7 +466,7 @@ mysql_generate_package_metadata() { "${pkgver}" \ "${pkgrel}" \ "${pkgname}" - printf '%s,0,0,0 FROM `architectures`' \ + printf '%s,0,0 FROM `architectures`' \ "${sub_pkgrel}" printf ' WHERE' printf ' `architectures`.`name` = from_base64("%s")' \ @@ -852,7 +851,7 @@ mysql_cleanup() { "${operator}" printf 'WHERE NOT EXISTS ' printf '(' - printf 'SELECT * FROM `binary_packages` ' + printf 'SELECT 1 FROM `binary_packages` ' printf 'WHERE `binary_packages`.`build_assignment`=`build_assignments`.`id`' printf ');\n' # remove failed_builds with unbroken build_assignments @@ -940,7 +939,7 @@ mysql_query_has_pending_dependencies() { # print a mysql query giving wether the package is part of a loop mysql_query_is_part_of_loop() { printf 'EXISTS (' - printf 'SELECT * FROM `build_dependency_loops`' + printf 'SELECT 1 FROM `build_dependency_loops`' printf ' WHERE `build_dependency_loops`.`build_assignment`=%s' \ "$1" printf ')' -- cgit v1.2.3-70-g09d2