From 68d398cb736a446a67e5d73804aa74e28edee249 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 7 Jun 2018 12:43:42 +0200 Subject: misc/database-layout.dump: calculate_maximal_moveable_set gets stability id instead of stability name --- misc/database-layout.dump | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'misc') diff --git a/misc/database-layout.dump b/misc/database-layout.dump index ff882b9..55ab902 100644 --- a/misc/database-layout.dump +++ b/misc/database-layout.dump @@ -34,7 +34,7 @@ INSERT IGNORE INTO `relevant_binary_packages` (`id`) UNTIL ROW_COUNT()=0 END REPEAT; END utf8mb4 utf8mb4_unicode_ci utf8mb4_unicode_ci -calculate_maximal_moveable_set NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `calculate_maximal_moveable_set`(IN `from_stability` VARCHAR(32)) +calculate_maximal_moveable_set NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `calculate_maximal_moveable_set`(IN `from_stability` MEDIUMINT) BEGIN DECLARE row_count_saved INT DEFAULT 0; DROP TEMPORARY TABLE IF EXISTS `moveable_bpir`; @@ -71,11 +71,7 @@ INSERT IGNORE INTO `package_blobs` (`ps_a`,`ps_b`) ON `b_bp`.`id`=`b_bpir`.`package` JOIN `repositories` AS `b_r` ON `b_bpir`.`repository`=`b_r`.`id` - JOIN `repository_stabilities` AS `a_rs` - ON `a_r`.`stability`=`a_rs`.`id` - JOIN `repository_stabilities` AS `b_rs` - ON `b_r`.`stability`=`b_rs`.`id` - WHERE `a_rs`.`name` = `from_stability` AND `b_rs`.`name` = `from_stability`; + WHERE `a_r`.`stability` = `from_stability` AND `b_r`.`stability` = `from_stability`; INSERT IGNORE INTO `moveable_bpir` (`id`,`to_repository`) SELECT `binary_packages_in_repositories`.`id`,`repository_moves`.`to_repository` FROM `binary_packages_in_repositories` @@ -93,7 +89,7 @@ INSERT IGNORE INTO `moveable_bpir` (`id`,`to_repository`) ON `package_sources`.`upstream_package_repository`=`upstream_repositories`.`id` JOIN `repository_moves` ON `upstream_repositories`.`id`=`repository_moves`.`upstream_package_repository` AND `repository_moves`.`from_repository`=`binary_packages_in_repositories`.`repository` - WHERE `repository_stabilities`.`name`=`from_stability` AND (`from_stability`="staging" OR `binary_packages`.`is_tested`) AND NOT `binary_packages`.`has_issues`; + WHERE `repository_stabilities`.`id`=`from_stability` AND (`repository_stabilities`.`name`="staging" OR `binary_packages`.`is_tested`) AND NOT `binary_packages`.`has_issues`; INSERT IGNORE INTO `replaced_bpir` (`id`,`replaced_by`) SELECT `r_bpir`.`id`,`m_bpir`.`id` FROM `moveable_bpir` -- cgit v1.2.3-70-g09d2