Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--misc/database-layout.dump38
1 files changed, 21 insertions, 17 deletions
diff --git a/misc/database-layout.dump b/misc/database-layout.dump
index b2f1c7f..fe963d4 100644
--- a/misc/database-layout.dump
+++ b/misc/database-layout.dump
@@ -1,7 +1,7 @@
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`));
-CREATE TEMPORARY TABLE `bl_copy` (`arch` SMALLINT,`pkgbase` VARCHAR(64),UNIQUE KEY `content`(`arch`,`pkgbase`));
+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`
@@ -36,22 +36,26 @@ INSERT IGNORE INTO `bl` (`arch`,`pkgbase`)
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`)
- WHERE EXISTS (
-SELECT 1
- FROM `install_target_providers`
- WHERE `install_target_providers`.`install_target`=`dependencies`.`depending_on`) AND NOT EXISTS (
-SELECT 1
+ 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 (
+SELECT DISTINCT `install_target_providers`.`install_target`,`architectures`.`id` AS `architecture`
FROM `install_target_providers`
- WHERE NOT EXISTS (
-SELECT 1
- FROM `bl_copy`
- JOIN `package_sources` AS `b_ps`
- ON `bl_copy`.`pkgbase`=`b_ps`.`pkgbase`
- JOIN `build_assignments` AS `b_ba`
- ON `b_ps`.`id`=`b_ba`.`package_source`
- JOIN `binary_packages` AS `b_bp`
- ON `b_ba`.`id`=`b_bp`.`build_assignment`
- WHERE `install_target_providers`.`package`=`b_bp`.`id`) AND `install_target_providers`.`install_target`=`dependencies`.`depending_on`);
+ 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) AS `itp_query`
+ ON `itp_query`.`install_target`=`dependencies`.`depending_on` AND `itp_query`.`architecture`=`a_ba`.`architecture`
+ WHERE `itp_query`.`install_target` IS NULL;
UNTIL ROW_COUNT()=0
END REPEAT;
SELECT `architectures`.`name`,`bl`.`pkgbase`