mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 09:02:00 +00:00
Fix 01019_Buffer_and_max_memory_usage
Before it does not check what it was intended, since it was too tricky.
This commit is contained in:
parent
9a3feb770e
commit
b4c7540436
@ -1,5 +1,6 @@
|
||||
DROP TABLE IF EXISTS null_;
|
||||
DROP TABLE IF EXISTS buffer_;
|
||||
DROP TABLE IF EXISTS aggregation_;
|
||||
|
||||
-- Each UInt64 is 8 bytes
|
||||
-- So 10e6 rows is 80e6 bytes
|
||||
@ -30,6 +31,11 @@ INSERT INTO buffer_ SELECT toUInt64(number) FROM system.numbers LIMIT toUInt64(1
|
||||
|
||||
OPTIMIZE TABLE buffer_; -- flush just in case
|
||||
|
||||
-- create complex aggregation to fail with Memory limit exceede error while writing to Buffer()
|
||||
-- String over UInt64 is enough to trigger the problem.
|
||||
CREATE MATERIALIZED VIEW aggregation_ engine=Memory() AS SELECT toString(key) FROM null_;
|
||||
|
||||
-- Check that max_memory_usage is ignored during write from StorageBuffer
|
||||
SET min_insert_block_size_bytes=0;
|
||||
SET min_insert_block_size_rows=100e3;
|
||||
INSERT INTO buffer_ SELECT toUInt64(number) FROM system.numbers LIMIT toUInt64(10e6+1);
|
||||
@ -38,3 +44,4 @@ SELECT count() FROM buffer_;
|
||||
|
||||
DROP TABLE null_;
|
||||
DROP TABLE buffer_;
|
||||
DROP TABLE aggregation_;
|
||||
|
Loading…
Reference in New Issue
Block a user