diff options
Diffstat (limited to 'misc')
-rw-r--r-- | misc/database-layout.dump | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/misc/database-layout.dump b/misc/database-layout.dump index d4f4283..538f63f 100644 --- a/misc/database-layout.dump +++ b/misc/database-layout.dump @@ -1,74 +1,3 @@ -blacklist_packages STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `blacklist_packages`() -blacklist_packages:BEGIN -CREATE TEMPORARY TABLE `bl` (`arch` SMALLINT,`pkgbase` VARCHAR(64),UNIQUE KEY `content`(`arch`,`pkgbase`),KEY (`arch`),KEY (`pkgbase`)); -CREATE TEMPORARY TABLE `bl_copy` (`arch` SMALLINT,`pkgbase` VARCHAR(64),UNIQUE KEY `content`(`arch`,`pkgbase`),KEY (`arch`),KEY (`pkgbase`)); -INSERT IGNORE INTO `bl`(`arch`,`pkgbase`) - SELECT `architectures`.`id`,`blacklist`.`pkgbase` - FROM `blacklist` - JOIN `architectures` - ON `architectures`.`name`=`blacklist`.`arch`; -CREATE TEMPORARY TABLE `available_install_targets` (`architecture` SMALLINT,`install_target` BIGINT,UNIQUE KEY `content`(`architecture`,`install_target`),KEY (`architecture`),KEY (`install_target`)); -REPEAT -DELETE - FROM `bl_copy`; -INSERT IGNORE INTO `bl_copy` (`arch`,`pkgbase`) - SELECT `bl`.`arch`, `bl`.`pkgbase` - FROM `bl`; -INSERT IGNORE INTO `bl`(`arch`,`pkgbase`) - SELECT `architecture_compatibilities`.`built_for`,`bl_copy`.`pkgbase` - FROM `bl_copy` - JOIN `architecture_compatibilities` - ON (`architecture_compatibilities`.`runs_on`=`bl_copy`.`arch` OR `bl_copy`.`arch`=1) AND `architecture_compatibilities`.`built_for`!=1; -DELETE - FROM `bl_copy`; -INSERT IGNORE INTO `bl_copy` (`arch`,`pkgbase`) - SELECT `bl`.`arch`, `bl`.`pkgbase` - FROM `bl`; -DELETE - FROM `available_install_targets`; -INSERT IGNORE INTO `available_install_targets` (`architecture`,`install_target`)SELECT `architectures`.`id`,`install_target_providers`.`install_target` - FROM `install_target_providers` - JOIN `binary_packages` - ON `install_target_providers`.`package`=`binary_packages`.`id` - JOIN `build_assignments` - ON `binary_packages`.`build_assignment`=`build_assignments`.`id` - JOIN `package_sources` - ON `build_assignments`.`package_source`=`package_sources`.`id` - JOIN `architectures` - ON (`architectures`.`id`=`binary_packages`.`architecture` OR `binary_packages`.`architecture`=1 OR `architectures`.`id`=1) - LEFT JOIN `bl_copy` - ON `bl_copy`.`pkgbase`=`package_sources`.`pkgbase` AND (`bl_copy`.`arch`=`build_assignments`.`architecture` OR `bl_copy`.`arch`=1) - WHERE `bl_copy`.`pkgbase` IS NULL; -INSERT IGNORE INTO `bl` (`arch`,`pkgbase`) - SELECT `a_bp`.`architecture`,`a_ps`.`pkgbase` - FROM `package_sources` AS `a_ps` - JOIN `build_assignments` AS `a_ba` - ON `a_ps`.`id`=`a_ba`.`package_source` - JOIN `binary_packages` AS `a_bp` - ON `a_ba`.`id`=`a_bp`.`build_assignment` - JOIN `architectures` AS `a_a` - ON `a_bp`.`architecture`=`a_a`.`id` - JOIN `dependencies` - ON `a_bp`.`id`=`dependencies`.`dependent` - JOIN `dependency_types` - ON `dependencies`.`dependency_type`=`dependency_types`.`id` AND (`dependency_types`.`relevant_for_building` OR `dependency_types`.`relevant_for_binary_packages`) - JOIN `install_target_providers` AS `itp_dummy` - ON `dependencies`.`depending_on`=`itp_dummy`.`install_target` - JOIN `binary_packages` AS `itp_bp_dummy` - ON `itp_dummy`.`package`=`itp_bp_dummy`.`id` AND (`itp_bp_dummy`.`architecture`=`a_ba`.`architecture` OR `a_ba`.`architecture`=1 OR `itp_bp_dummy`.`architecture`=1) - LEFT JOIN `available_install_targets` - ON `available_install_targets`.`install_target`=`dependencies`.`depending_on` AND `available_install_targets`.`architecture`=`a_ba`.`architecture` - WHERE `available_install_targets`.`install_target` IS NULL; -UNTIL ROW_COUNT()=0 -END REPEAT; -SELECT `architectures`.`name`,`bl`.`pkgbase` - FROM `bl` - JOIN `architectures` - ON `architectures`.`id`=`bl`.`arch`; -DROP TEMPORARY TABLE `bl`; -DROP TEMPORARY TABLE `bl_copy`; -DROP TEMPORARY TABLE `available_install_targets`; -END utf8mb4 utf8mb4_unicode_ci utf8mb4_unicode_ci calculate_maximal_moveable_set STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `calculate_maximal_moveable_set`(IN `arch_id` MEDIUMINT,IN `from_stability` MEDIUMINT) BEGIN DECLARE row_count_saved INT DEFAULT 0; |