ClickHouse/tests/queries/0_stateless/00930_max_partitions_per_insert_block.sql
Ivan 97f2a2213e
Move all folders inside /dbms one level up (#9974)
* Move some code outside dbms/src folder
* Fix paths
2020-04-02 02:51:21 +03:00

15 lines
641 B
SQL

DROP TABLE IF EXISTS partitions;
CREATE TABLE partitions (x UInt64) ENGINE = MergeTree ORDER BY x PARTITION BY x;
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';
SET max_partitions_per_insert_block = 1;
INSERT INTO partitions SELECT * FROM system.numbers LIMIT 1;
INSERT INTO partitions SELECT * FROM system.numbers LIMIT 2; -- { serverError 252 }
DROP TABLE partitions;