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-functions24
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/mysql-functions b/lib/mysql-functions
index 4b27ac9..a97202b 100755
--- a/lib/mysql-functions
+++ b/lib/mysql-functions
@@ -1377,6 +1377,30 @@ mysql_load_min_and_max_versions() {
mysql_run_query
)
fi
+
+ if [ -z "${min_version_id}" ]; then
+ min_version_id=$(
+ {
+ printf 'SELECT `versions`.`id`'
+ printf ' FROM `versions`'
+ printf ' ORDER BY `versions`.`order`'
+ printf ' LIMIT 1'
+ } | \
+ mysql_run_query
+ )
+ fi
+
+ if [ -z "${max_version_id}" ]; then
+ max_version_id=$(
+ {
+ printf 'SELECT `versions`.`id`'
+ printf ' FROM `versions`'
+ printf ' ORDER BY `versions`.`order` DESC'
+ printf ' LIMIT 1'
+ } | \
+ mysql_run_query
+ )
+ fi
}
# mysql_query_remove_old_binary_packages_from_build_list