mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-19 04:42:37 +00:00
3c08e198ad
Otherwise it fails in private fork CI Co-authored-by: János Benjamin Antal <antaljanosbenjamin@users.noreply.github.com>
15 lines
995 B
Django/Jinja
15 lines
995 B
Django/Jinja
drop table if exists data_rmt;
|
|
drop table if exists data_mt;
|
|
|
|
create table data_rmt (key Int) engine=ReplicatedMergeTree('/tables/{database}/data', '{table}') order by tuple() settings finished_mutations_to_keep=0, merge_tree_clear_old_parts_interval_seconds=1;
|
|
create table data_mt (key Int) engine=MergeTree() order by tuple() settings finished_mutations_to_keep=0, merge_tree_clear_old_parts_interval_seconds=1;
|
|
|
|
{% for table in ['data_rmt', 'data_mt'] %}
|
|
alter table {{table}} delete where 1 settings mutations_sync = 1;
|
|
select 'mutations after ALTER for {{table}}', count() from system.mutations where database = currentDatabase() and table = '{{table}}';
|
|
-- merge_tree_clear_old_parts_interval_seconds=1, but wait few seconds more
|
|
select sleep(5) settings function_sleep_max_microseconds_per_block=10e6 format Null;
|
|
select 'mutations after cleanup for {{table}}', count() from system.mutations where database = currentDatabase() and table = '{{table}}';
|
|
drop table {{table}};
|
|
{% endfor %}
|