From edefe4468a071b3e0252d047d2c030f3abf3c483 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 29 Mar 2018 16:27:21 +0200 Subject: move calculation of mysql_files_table_partitions from lib/mysql-functions to conf/default.conf - $work_dir was not yet set --- conf/default.conf | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'conf') diff --git a/conf/default.conf b/conf/default.conf index efbb5b4..ff87f53 100755 --- a/conf/default.conf +++ b/conf/default.conf @@ -156,3 +156,14 @@ if [ "${master_build_server_identity}" = "${work_dir}/.ssh/id_rsa" ] && \ mkdir -p "${master_build_server_identity%/*}" ssh-keygen -b4096 -f "${master_build_server_identity}" fi + +mysql_files_table_partitions=$( + # shellcheck disable=SC2016 + printf 'SHOW CREATE TABLE `files`;\n' | \ + mysql_run_query | \ + sed -n ' + s/^.*PARTITIONS \([0-9]\+\) .*$/\1/ + T + p + ' +) -- cgit v1.2.3-70-g09d2