2020-10-20 15:57:53 +00:00
|
|
|
#!/usr/bin/env bash
|
2021-09-12 12:35:27 +00:00
|
|
|
# Tags: no-parallel
|
2020-10-20 15:57:53 +00:00
|
|
|
|
|
|
|
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
2020-12-28 11:46:53 +00:00
|
|
|
# shellcheck source=../shell_config.sh
|
2020-10-20 15:57:53 +00:00
|
|
|
. "$CURDIR"/../shell_config.sh
|
|
|
|
|
2020-10-21 07:10:40 +00:00
|
|
|
WORKING_FOLDER_01527="${CLICKHOUSE_TMP}/01527_clickhouse_local_optimize"
|
|
|
|
rm -rf "${WORKING_FOLDER_01527}"
|
2020-10-22 09:02:14 +00:00
|
|
|
mkdir -p "${WORKING_FOLDER_01527}"
|
2020-10-21 07:10:40 +00:00
|
|
|
|
|
|
|
# OPTIMIZE was crashing due to lack of temporary volume in local
|
2023-09-11 09:32:41 +00:00
|
|
|
${CLICKHOUSE_LOCAL} --multiquery --query "drop database if exists d; create database d; create table d.t engine MergeTree order by a as select 1 a; optimize table d.t final" --path="${WORKING_FOLDER_01527}"
|
2020-10-21 07:10:40 +00:00
|
|
|
|
2020-10-22 09:02:14 +00:00
|
|
|
rm -rf "${WORKING_FOLDER_01527}"
|