ClickHouse/dbms/tests/queries/0_stateless/00930_max_partitions_per_insert_block.sql

15 lines
641 B
MySQL
Raw Normal View History

2019-06-07 14:26:29 +00:00
DROP TABLE IF EXISTS partitions;
CREATE TABLE partitions (x UInt64) ENGINE = MergeTree ORDER BY x PARTITION BY x;
2019-03-29 11:20:53 +00:00
2019-06-07 14:26:29 +00:00
INSERT INTO partitions SELECT * FROM system.numbers LIMIT 100;
SELECT count() FROM system.parts WHERE database = currentDatabase() AND table = 'partitions';
INSERT INTO partitions SELECT * FROM system.numbers LIMIT 100;
SELECT count() FROM system.parts WHERE database = currentDatabase() AND table = 'partitions';
2019-03-29 11:20:53 +00:00
SET max_partitions_per_insert_block = 1;
2019-06-07 14:26:29 +00:00
INSERT INTO partitions SELECT * FROM system.numbers LIMIT 1;
INSERT INTO partitions SELECT * FROM system.numbers LIMIT 2; -- { serverError 252 }
2019-03-29 11:20:53 +00:00
2019-06-07 14:26:29 +00:00
DROP TABLE partitions;