From 7ffd74ca74b875d9d272d088ac49a1a26eb74a83 Mon Sep 17 00:00:00 2001 From: alesapin Date: Tue, 26 Feb 2019 17:52:55 +0300 Subject: [PATCH] Fix UB in IsIn function of cache dictionary and typo in integration test. --- dbms/src/Dictionaries/CacheDictionary.cpp | 2 +- dbms/tests/integration/test_external_dictionaries/test.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dbms/src/Dictionaries/CacheDictionary.cpp b/dbms/src/Dictionaries/CacheDictionary.cpp index 752752fae59..27f966895a8 100644 --- a/dbms/src/Dictionaries/CacheDictionary.cpp +++ b/dbms/src/Dictionaries/CacheDictionary.cpp @@ -111,7 +111,7 @@ void CacheDictionary::isInImpl(const PaddedPODArray & child_ids, const Ance const auto null_value = std::get(hierarchical_attribute->null_values); - PaddedPODArray children(out_size); + PaddedPODArray children(out_size, 0); PaddedPODArray parents(child_ids.begin(), child_ids.end()); while (true) diff --git a/dbms/tests/integration/test_external_dictionaries/test.py b/dbms/tests/integration/test_external_dictionaries/test.py index 7878620a65d..314ec26a106 100644 --- a/dbms/tests/integration/test_external_dictionaries/test.py +++ b/dbms/tests/integration/test_external_dictionaries/test.py @@ -79,7 +79,6 @@ LAYOUTS = [ ] SOURCES = [ - # some troubles with that dictionary SourceMongo("MongoDB", "localhost", "27018", "mongo1", "27017", "root", "clickhouse"), SourceMySQL("MySQL", "localhost", "3308", "mysql1", "3306", "root", "clickhouse"), SourceClickHouse("RemoteClickHouse", "localhost", "9000", "clickhouse1", "9000", "default", ""), @@ -238,7 +237,7 @@ def test_ranged_dictionaries(started_cluster): '1973-06-28', '1985-02-28 23:43:25', 'hello', 22.543, 3332154213.4]), Row(fields, - [1, '2019-04-10', '2019-04-01', '2019-04-28', + [2, '2019-04-10', '2019-04-01', '2019-04-28', 11, 3223, 41444, 52515, -65, -747, -8388, -9099, '550e8400-e29b-41d4-a716-446655440004', '1973-06-29', '2002-02-28 23:23:25', '!!!!',