Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rwxr-xr-xlib/mysql-functions19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/mysql-functions b/lib/mysql-functions
index a51ac8c..d192112 100755
--- a/lib/mysql-functions
+++ b/lib/mysql-functions
@@ -905,6 +905,25 @@ mysql_package_name_query() {
printf ')'
}
+# TODO: delete mysql_repair_binary_packages_in_repositories when obsolete
+
+# mysql_repair_binary_packages_in_repositories
+# temporary function to keep binary_packages_in_repositories up-to-date
+mysql_repair_binary_packages_in_repositories() {
+ {
+ printf 'DELETE `binary_packages_in_repositories`'
+ printf ' FROM `binary_packages_in_repositories`'
+ printf ' LEFT JOIN `binary_packages`'
+ printf ' ON `binary_packages`.`id`=`binary_packages_in_repositories`.`package`'
+ printf ' WHERE `binary_packages`.`repository` != `binary_packages_in_repositories`.`repository`;\n'
+ printf 'COMMIT;\n'
+ printf 'INSERT IGNORE INTO `binary_packages_in_repositories` (`package`,`repository`)'
+ printf ' SELECT `binary_packages`.`id`,`binary_packages`.`repository`'
+ printf ' FROM `binary_packages`;\n'
+ } | \
+ mysql_run_query
+}
+
# mysql_join_*_*
# print 'JOIN' part of mysql query to connect the respective tables
# these functions take 2 optional arguments, acting as aliases for