mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-30 19:42:00 +00:00
28 lines
809 B
Plaintext
28 lines
809 B
Plaintext
-- { echoOn }
|
|
|
|
create table data (key Int) engine=Memory();
|
|
create table dist (key Int) engine=Distributed(test_shard_localhost, currentDatabase(), data);
|
|
system stop distributed sends dist;
|
|
-- check that FLUSH DISTRIBUTED does flushing anyway
|
|
insert into dist values (1);
|
|
select * from data;
|
|
system flush distributed dist;
|
|
select * from data;
|
|
1
|
|
truncate table data;
|
|
-- check that flush_on_detach=1 by default
|
|
insert into dist values (1);
|
|
detach table dist;
|
|
select * from data;
|
|
1
|
|
attach table dist;
|
|
truncate table data;
|
|
-- check flush_on_detach=0
|
|
drop table dist;
|
|
create table dist (key Int) engine=Distributed(test_shard_localhost, currentDatabase(), data) settings flush_on_detach=0;
|
|
system stop distributed sends dist;
|
|
insert into dist values (1);
|
|
detach table dist;
|
|
select * from data;
|
|
attach table dist;
|