diff --git a/dbms/include/DB/Interpreters/Join.h b/dbms/include/DB/Interpreters/Join.h index 4a0f562c0e1..47901cef988 100644 --- a/dbms/include/DB/Interpreters/Join.h +++ b/dbms/include/DB/Interpreters/Join.h @@ -146,7 +146,7 @@ private: /** Блоки данных таблицы, с которой идёт соединение. */ - Blocks blocks; + BlocksList blocks; MapsAny maps_any; MapsAll maps_all; diff --git a/dbms/tests/queries/0_stateless/00099_join_many_blocks_segfault.reference b/dbms/tests/queries/0_stateless/00099_join_many_blocks_segfault.reference new file mode 100644 index 00000000000..5bfd8060b89 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00099_join_many_blocks_segfault.reference @@ -0,0 +1 @@ +1 abc diff --git a/dbms/tests/queries/0_stateless/00099_join_many_blocks_segfault.sql b/dbms/tests/queries/0_stateless/00099_join_many_blocks_segfault.sql new file mode 100644 index 00000000000..63f31da852f --- /dev/null +++ b/dbms/tests/queries/0_stateless/00099_join_many_blocks_segfault.sql @@ -0,0 +1,12 @@ +SELECT + 1 AS DomainID, + Domain ANY LEFT JOIN +( + SELECT + 1 AS DomainID, + 'abc' AS Domain + UNION ALL + SELECT + 2 AS DomainID, + 'def' AS Domain +) USING DomainID;