From d67478ccbef5f540b597303120b2fd47317680cd Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 9 Feb 2018 21:29:30 +0100 Subject: bin/mysql-functions: mysql_remove_duplicate_build_order: use sub_pkgrel from old package --- bin/mysql-functions | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/mysql-functions b/bin/mysql-functions index cdc5f38..16c0141 100755 --- a/bin/mysql-functions +++ b/bin/mysql-functions @@ -912,9 +912,10 @@ mysql_repair_binary_packages_without_build_assignment() { mysql_remove_duplicate_build_order() { { - printf 'CREATE TEMPORARY TABLE `ren` (`old` BIGINT, `new` BIGINT, `repo` BIGINT);\n' - printf 'INSERT INTO `ren` (`old`,`new`,`repo`)' - printf ' SELECT `old`.`id`,`new`.`id`,`old`.`repository`' + printf 'CREATE TEMPORARY TABLE `ren`' + printf ' (`old` BIGINT, `new` BIGINT, `repo` BIGINT, `sub_pkgrel` BIGINT);\n' + printf 'INSERT INTO `ren` (`old`,`new`,`repo`,`sub_pkgrel`)' + printf ' SELECT `old`.`id`,`new`.`id`,`old`.`repository`,`old`.`sub_pkgrel`' printf ' FROM `binary_packages` as `old`' printf ' JOIN `binary_packages` as `new` ON' printf ' `old`.`%s`=`new`.`%s` AND' \ @@ -942,7 +943,7 @@ mysql_remove_duplicate_build_order() { printf 'UPDATE IGNORE `binary_packages`' printf ' JOIN `ren` ON `ren`.`new`=`binary_packages`.`id`' printf ' SET `binary_packages`.`repository`=`ren`.`repo`,' - printf ' `binary_packages`.`sub_pkgrel`=`binary_packages`.`sub_pkgrel`-1;\n' + printf ' `binary_packages`.`sub_pkgrel`=`ren`.`sub_pkgrel`;\n' } | \ ${mysql_command} } -- cgit v1.2.3-70-g09d2