Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-05-14 16:14:45 +0200
committerErich Eckner <git@eckner.net>2018-05-14 16:14:45 +0200
commit2b57fa56eb328ca9e14718426be8029c0738ed63 (patch)
tree4629fbd9689fab3bf48aa756949d7e864afd70da /lib
parent5a45a6cc3fde83f725bcd7939bea254636c9b935 (diff)
lib/mysql-functions: mysql_show_binary_packages_in_repositories_issues new
Diffstat (limited to 'lib')
-rwxr-xr-xlib/mysql-functions20
1 files changed, 20 insertions, 0 deletions
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
+}