From efab707fbc3fb72dfe2caae54323ea6288054b08 Mon Sep 17 00:00:00 2001 From: Kozlov Ivan Date: Tue, 5 Feb 2019 17:55:30 +0300 Subject: [PATCH] query for reproduce bug --- .../bugs/leak_when_memory_limit_exceeded.sql | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 dbms/tests/queries/bugs/leak_when_memory_limit_exceeded.sql diff --git a/dbms/tests/queries/bugs/leak_when_memory_limit_exceeded.sql b/dbms/tests/queries/bugs/leak_when_memory_limit_exceeded.sql new file mode 100644 index 00000000000..68811ad061e --- /dev/null +++ b/dbms/tests/queries/bugs/leak_when_memory_limit_exceeded.sql @@ -0,0 +1,22 @@ +-- max_memory_usage = 10000000000 (10 GB default) +-- Intel® Xeon® E5-1650 v3 Hexadcore 128 GB DDR4 ECC +-- Estimated time: ~ 250 seconds +-- Read rows: ~ 272 000 000 +SELECT + key, + uniqState(uuid_1) uuid_1_st, + uniqState(uuid_2) uuid_2_st, + uniqState(uuid_3) uuid_3_st +FROM ( + SELECT + rand64() value, + toString(value) value_str, + UUIDNumToString(toFixedString(substring(value_str, 1, 16), 16)) uuid_1, -- Any UUID + UUIDNumToString(toFixedString(substring(value_str, 2, 16), 16)) uuid_2, -- More memory + UUIDNumToString(toFixedString(substring(value_str, 3, 16), 16)) uuid_3, -- And more memory + modulo(value, 5000000) key -- Cardinality in my case + FROM numbers(550000000) +) +GROUP BY + key +LIMIT 100;