From 790ca15472478f9c714e11067fcc956fbe0fb572 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 29 Mar 2018 16:01:37 +0200 Subject: bin/wtf: explicitely chose partition --- bin/wtf | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'bin/wtf') diff --git a/bin/wtf b/bin/wtf index 247b3e3..b3e29a6 100755 --- a/bin/wtf +++ b/bin/wtf @@ -21,6 +21,8 @@ hash=$( )" ) +partition=$((hash % mysql_files_table_partitions)) + result=$( # shellcheck disable=SC2016 { @@ -31,7 +33,11 @@ result=$( mysql_join_binary_packages_architectures mysql_join_binary_packages_repositories mysql_join_binary_packages_file_providers + printf ' PARTITION (p%s)' \ + "${partition}" mysql_join_file_providers_files + printf ' PARTITION (p%s)' \ + "${partition}" printf ' WHERE `files`.`name_hash`=%s' \ "${hash}" printf ' AND (`files`.`name`=from_base64("%s")' \ -- cgit v1.2.3