diff options
author | Erich Eckner <git@eckner.net> | 2019-01-17 15:24:40 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-01-17 15:24:40 +0100 |
commit | c9f55c95cb382e22c41a310c1005e3de43379ae9 (patch) | |
tree | 38210b816af5645dad7fad10b1de6a32fe89c76b /lib/common-functions | |
parent | 294c66ccc56ee6200b288585833cae1d1bfc3ea8 (diff) | |
download | builder-c9f55c95cb382e22c41a310c1005e3de43379ae9.tar.xz |
style: WHERE,ON,FROM,SELECT,JOIN should be on beginning of source lines
Diffstat (limited to 'lib/common-functions')
-rwxr-xr-x | lib/common-functions | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/common-functions b/lib/common-functions index cd938f8..dba56b7 100755 --- a/lib/common-functions +++ b/lib/common-functions @@ -94,7 +94,8 @@ find_git_repository_to_package_repository() { repository=$( # shellcheck disable=SC2016 { - printf 'SELECT `git_repositories`.`name` FROM `git_repositories`' + printf 'SELECT `git_repositories`.`name`' + printf ' FROM `git_repositories`' mysql_join_git_repositories_upstream_repositories printf ' WHERE `upstream_repositories`.`name`=from_base64("%s");\n' \ "$(printf '%s' "$1" | base64 -w0)" @@ -168,7 +169,8 @@ remove_old_package_versions() { printf ' AND `d_r`.`is_on_master_mirror`' mysql_join_repositories_architectures 'd_r' 'd_ra' mysql_join_binary_packages_architectures 'd_bp' 'd_bpa' - printf ' JOIN `binary_packages` AS `o_bp` ON `d_bp`.`pkgname`=`o_bp`.`pkgname`' + printf ' JOIN `binary_packages` AS `o_bp`' + printf ' ON `d_bp`.`pkgname`=`o_bp`.`pkgname`' mysql_join_binary_packages_binary_packages_in_repositories 'o_bp' 'o_bpir' mysql_join_binary_packages_in_repositories_repositories 'o_bpir' 'o_r' printf ' AND `o_r`.`is_on_master_mirror`' @@ -243,8 +245,10 @@ remove_old_package_versions() { printf 'CREATE TEMPORARY TABLE `del` (`id` BIGINT NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`));\n' printf 'LOAD DATA LOCAL INFILE "%s" INTO TABLE `del` (`id`);\n' \ "${tmp_dir}/db-removes" - printf 'DELETE `binary_packages_in_repositories` FROM `binary_packages_in_repositories`' - printf ' JOIN `del` ON `binary_packages_in_repositories`.`id`=`del`.`id`;\n' + printf 'DELETE `binary_packages_in_repositories`' + printf ' FROM `binary_packages_in_repositories`' + printf ' JOIN `del`' + printf ' ON `binary_packages_in_repositories`.`id`=`del`.`id`;\n' mysql_query_and_delete_unneeded_binary_packages } | \ mysql_run_query | \ |