index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
-rwxr-xr-x | bin/why-dont-you | 18 |
diff --git a/bin/why-dont-you b/bin/why-dont-you index 9b50427..61eae34 100755 --- a/bin/why-dont-you +++ b/bin/why-dont-you @@ -263,12 +263,19 @@ case "${action}" in # shellcheck disable=SC2016 { - printf 'CREATE TEMPORARY TABLE `bpirs` (' - printf '`id` BIGINT,' - printf 'UNIQUE KEY `id`(`id`)' - printf ');\n' + for copy in '' '_2'; do + printf 'CREATE TEMPORARY TABLE `bpirs%s` (' \ + "${copy}" + printf '`id` BIGINT,' + printf 'UNIQUE KEY `id`(`id`)' + printf ');\n' + done printf 'LOAD DATA LOCAL INFILE "%s" INTO TABLE `bpirs`;\n' \ "${tmp_dir}/packages" + printf 'INSERT INTO `bpirs_2`(`id`)' + printf ' SELECT ' + printf '`bpirs`.`id`' + printf ' FROM `bpirs`;\n' printf 'SELECT CONCAT(' printf '"\\"",' @@ -302,6 +309,9 @@ case "${action}" in mysql_join_binary_packages_in_repositories_repositories 'itp_bpir' 'itp_r' printf ' AND `itp_r`.`architecture`=`repositories`.`architecture`' printf ' AND `repositories`.`stability`=`itp_r`.`stability`' + printf ' LEFT JOIN `bpirs_2`' + printf ' ON `bpirs_2`.`id`=`itp_bpir`.`id`' + printf ' WHERE `bpirs_2`.`id` IS NULL' printf ') AS `sub_q`' printf ' GROUP BY `sub_q`.`id`;\n' |