From 2b57fa56eb328ca9e14718426be8029c0738ed63 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 14 May 2018 16:14:45 +0200 Subject: lib/mysql-functions: mysql_show_binary_packages_in_repositories_issues new --- lib/mysql-functions | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'lib/mysql-functions') diff --git a/lib/mysql-functions b/lib/mysql-functions index 21e64e7..55e994e 100755 --- a/lib/mysql-functions +++ b/lib/mysql-functions @@ -1029,3 +1029,23 @@ for link in \ mysql_join__generic "${table_a}" "${column_a}" "${table_b}" "${column_b}" mysql_join__generic "${table_b}" "${column_b}" "${table_a}" "${column_a}" done + +# mysql_show_binary_packages_in_repositories_issues +# show issues of binary_packages_in_repositories +mysql_show_binary_packages_in_repositories_issues() { + { + printf 'SELECT * FROM `binary_packages`' + printf ' WHERE NOT EXISTS (' + printf 'SELECT 1 FROM `binary_packages_in_repositories`' + printf ' WHERE `binary_packages_in_repositories`.`package`=`binary_packages`.`id`' + printf ' AND `binary_packages_in_repositories`.`repository`=`binary_packages`.`repository`' + printf ');\n' + printf 'SELECT * FROM `binary_packages_in_repositories`' + printf ' WHERE NOT EXISTS (' + printf 'SELECT 1 FROM `binary_packages`' + printf ' WHERE `binary_packages_in_repositories`.`package`=`binary_packages`.`id`' + printf ' AND `binary_packages_in_repositories`.`repository`=`binary_packages`.`repository`' + printf ');\n' + } | \ + mysql_run_query +} -- cgit v1.2.3-70-g09d2