Added a test

This commit is contained in:
Alexey Milovidov 2019-03-29 14:20:53 +03:00
parent 8a31d998fd
commit ae8655f217
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,14 @@
DROP TABLE IF EXISTS test.partitions;
CREATE TABLE test.partitions (x UInt64) ENGINE = MergeTree ORDER BY x PARTITION BY x;
INSERT INTO test.partitions SELECT * FROM system.numbers LIMIT 100;
SELECT count() FROM system.parts WHERE database = 'test' AND table = 'partitions';
INSERT INTO test.partitions SELECT * FROM system.numbers LIMIT 100;
SELECT count() FROM system.parts WHERE database = 'test' AND table = 'partitions';
SET max_partitions_per_insert_block = 1;
INSERT INTO test.partitions SELECT * FROM system.numbers LIMIT 1;
INSERT INTO test.partitions SELECT * FROM system.numbers LIMIT 2; -- { serverError 252 }
DROP TABLE test.partitions;