Add a test for Buffer flush before shutdown

This commit is contained in:
Azat Khuzhin 2021-05-13 22:35:01 +03:00
parent 5a8d61954a
commit d768a2ac71
3 changed files with 30 additions and 1 deletions

View File

@ -0,0 +1,2 @@
0
5

View 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;

View File

@ -720,6 +720,7 @@
"01804_dictionary_decimal256_type",
"01850_dist_INSERT_preserve_error", // uses cluster with different static databases shard_0/shard_1
"01821_table_comment",
"01710_projection_fetch"
"01710_projection_fetch",
"01870_buffer_flush" // creates database
]
}