From c9f55c95cb382e22c41a310c1005e3de43379ae9 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 17 Jan 2019 15:24:40 +0100 Subject: style: WHERE,ON,FROM,SELECT,JOIN should be on beginning of source lines --- lib/common-functions | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'lib/common-functions') 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 | \ -- cgit v1.2.3-70-g09d2