Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-03-29 20:24:09 +0200
committerErich Eckner <git@eckner.net>2018-03-29 20:24:09 +0200
commit4e9339318bb80acf62145f932c65e0c89ad6ee99 (patch)
tree516322c89d4d68a865f2233b1323cc8e6136e193
parentedefe4468a071b3e0252d047d2c030f3abf3c483 (diff)
bin/wtf: fix joins
-rwxr-xr-xbin/wtf6
1 files changed, 2 insertions, 4 deletions
diff --git a/bin/wtf b/bin/wtf
index b3e29a6..4c03103 100755
--- a/bin/wtf
+++ b/bin/wtf
@@ -32,11 +32,9 @@ result=$(
printf ' FROM `binary_packages`'
mysql_join_binary_packages_architectures
mysql_join_binary_packages_repositories
- mysql_join_binary_packages_file_providers
- printf ' PARTITION (p%s)' \
+ printf ' JOIN `file_providers` PARTITION (p%s) ON `file_providers`.`package`=`binary_packages`.`id`' \
"${partition}"
- mysql_join_file_providers_files
- printf ' PARTITION (p%s)' \
+ printf ' JOIN `files` PARTITION (p%s) ON `files`.`id`=`file_providers`.`file` AND `files`.`name_hash`=`file_providers`.`file_name_hash`' \
"${partition}"
printf ' WHERE `files`.`name_hash`=%s' \
"${hash}"