diff options
author | Erich Eckner <git@eckner.net> | 2018-06-01 11:06:41 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-06-01 11:06:41 +0200 |
commit | e0c167a65916bf995add39aec94f5f524af834e4 (patch) | |
tree | e828228392ecdc50115468c7384c0e0353b2382b /lib | |
parent | b72da8d58250ade67c3315545665cd2f77c86d01 (diff) | |
download | builder-e0c167a65916bf995add39aec94f5f524af834e4.tar.xz |
make `binary_packages`.`is_to_be_deleted` and `binary_packages`.`last_moved` obsolete; cleanup some queries
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/mysql-functions | 9 |
1 files changed, 4 insertions, 5 deletions
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 ')' |