mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
Add a test for Buffer flush before shutdown
This commit is contained in:
parent
5a8d61954a
commit
d768a2ac71
2
tests/queries/0_stateless/01870_buffer_flush.reference
Normal file
2
tests/queries/0_stateless/01870_buffer_flush.reference
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
0
|
||||||
|
5
|
26
tests/queries/0_stateless/01870_buffer_flush.sql
Normal file
26
tests/queries/0_stateless/01870_buffer_flush.sql
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
-- Check that Buffer will be flushed before shutdown
|
||||||
|
-- (via DETACH DATABASE)
|
||||||
|
|
||||||
|
drop database if exists db_01870;
|
||||||
|
create database db_01870;
|
||||||
|
|
||||||
|
-- Right now the order for shutdown is defined and it is:
|
||||||
|
-- (prefixes are important, to define the order)
|
||||||
|
-- - a_data_01870
|
||||||
|
-- - z_buffer_01870
|
||||||
|
-- so on DETACH DATABASE the following error will be printed:
|
||||||
|
--
|
||||||
|
-- Destination table default.a_data_01870 doesn't exist. Block of data is discarded.
|
||||||
|
create table db_01870.a_data_01870 as system.numbers Engine=TinyLog();
|
||||||
|
create table db_01870.z_buffer_01870 as system.numbers Engine=Buffer(db_01870, a_data_01870, 1,
|
||||||
|
100, 100, /* time */
|
||||||
|
100, 100, /* rows */
|
||||||
|
100, 1e6 /* bytes */
|
||||||
|
);
|
||||||
|
insert into db_01870.z_buffer_01870 select * from system.numbers limit 5;
|
||||||
|
select count() from db_01870.a_data_01870;
|
||||||
|
detach database db_01870;
|
||||||
|
attach database db_01870;
|
||||||
|
select count() from db_01870.a_data_01870;
|
||||||
|
|
||||||
|
drop database db_01870;
|
@ -720,6 +720,7 @@
|
|||||||
"01804_dictionary_decimal256_type",
|
"01804_dictionary_decimal256_type",
|
||||||
"01850_dist_INSERT_preserve_error", // uses cluster with different static databases shard_0/shard_1
|
"01850_dist_INSERT_preserve_error", // uses cluster with different static databases shard_0/shard_1
|
||||||
"01821_table_comment",
|
"01821_table_comment",
|
||||||
"01710_projection_fetch"
|
"01710_projection_fetch",
|
||||||
|
"01870_buffer_flush" // creates database
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user