Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/bootstrap-mysql
diff options
context:
space:
mode:
Diffstat (limited to 'bin/bootstrap-mysql')
-rwxr-xr-xbin/bootstrap-mysql14
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/bootstrap-mysql b/bin/bootstrap-mysql
index 6b64d96..ee51e1a 100755
--- a/bin/bootstrap-mysql
+++ b/bin/bootstrap-mysql
@@ -42,7 +42,7 @@ fi
printf 'DROP PROCEDURE IF EXISTS calculate_maximal_moveable_set;\n'
printf 'DELIMITER //\n'
- printf 'CREATE PROCEDURE calculate_maximal_moveable_set(IN `from_stability` VARCHAR(32))\n'
+ printf 'CREATE PROCEDURE calculate_maximal_moveable_set(IN `from_stability` MEDIUMINT)\n'
printf 'BEGIN\n'
# variable to store count of changed rows
printf 'DECLARE row_count_saved INT DEFAULT 0;\n'
@@ -75,10 +75,8 @@ fi
mysql_join_binary_packages_in_repositories_repositories 'a_bpir' 'a_r'
mysql_join_binary_packages_binary_packages_in_repositories 'b_bp' 'b_bpir'
mysql_join_binary_packages_in_repositories_repositories 'b_bpir' 'b_r'
- mysql_join_repositories_repository_stabilities 'a_r' 'a_rs'
- mysql_join_repositories_repository_stabilities 'b_r' 'b_rs'
- printf ' WHERE `a_rs`.`name` = `from_stability`'
- printf ' AND `b_rs`.`name` = `from_stability`;\n'
+ printf ' WHERE `a_r`.`stability` = `from_stability`'
+ printf ' AND `b_r`.`stability` = `from_stability`;\n'
# these packages are considered for moving:
printf 'INSERT IGNORE INTO `moveable_bpir` (`id`,`to_repository`)'
printf ' SELECT `binary_packages_in_repositories`.`id`,`repository_moves`.`to_repository`'
@@ -92,9 +90,11 @@ fi
mysql_join_upstream_repositories_repository_moves
printf ' AND `repository_moves`.`from_repository`=`binary_packages_in_repositories`.`repository`'
# correct stability: "testing"/"staging" - as chosen
- printf ' WHERE `repository_stabilities`.`name`=`from_stability`'
+ printf ' WHERE `repository_stabilities`.`id`=`from_stability`'
printf ' AND ('
- printf '`from_stability`="staging"'
+ # this should not be replaced by ${repository_stability_ids__staging},
+ # because it may change
+ printf '`repository_stabilities`.`name`="staging"'
# "testing" packages must be tested
printf ' OR `binary_packages`.`is_tested`'
printf ')'