diff --git a/dbms/tests/queries/0_stateless/00986_materialized_view_stack_overflow.reference b/dbms/tests/queries/0_stateless/00986_materialized_view_stack_overflow.reference new file mode 100644 index 00000000000..e69de29bb2d diff --git a/dbms/tests/queries/0_stateless/00986_materialized_view_stack_overflow.sql b/dbms/tests/queries/0_stateless/00986_materialized_view_stack_overflow.sql new file mode 100644 index 00000000000..a39688d81a7 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00986_materialized_view_stack_overflow.sql @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS test1; +DROP TABLE IF EXISTS test2; +DROP TABLE IF EXISTS mv1; +DROP TABLE IF EXISTS mv2; + +CREATE TABLE test1 (a UInt8) ENGINE MergeTree ORDER BY a; +CREATE TABLE test2 (a UInt8) ENGINE MergeTree ORDER BY a; + +CREATE MATERIALIZED VIEW mv1 TO test1 AS SELECT a FROM test2; +CREATE MATERIALIZED VIEW mv2 TO test2 AS SELECT a FROM test1; + +insert into test1 values (1); -- { serverError 306 } + +DROP TABLE test1; +DROP TABLE test2; +DROP TABLE mv1; +DROP TABLE mv2; diff --git a/dbms/tests/queries/0_stateless/00987_distributed_stack_overflow.reference b/dbms/tests/queries/0_stateless/00987_distributed_stack_overflow.reference new file mode 100644 index 00000000000..e69de29bb2d diff --git a/dbms/tests/queries/0_stateless/00987_distributed_stack_overflow.sql b/dbms/tests/queries/0_stateless/00987_distributed_stack_overflow.sql new file mode 100644 index 00000000000..8bc7b6963b9 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00987_distributed_stack_overflow.sql @@ -0,0 +1,13 @@ +DROP TABLE IF EXISTS distr1; +DROP TABLE IF EXISTS distr2; + +CREATE TABLE distr (x UInt8) ENGINE = Distributed(test_shard_localhost, currentDatabase(), distr); -- { serverError 269 } + +CREATE TABLE distr1 (x UInt8) ENGINE = Distributed(test_shard_localhost, currentDatabase(), distr2); +CREATE TABLE distr2 (x UInt8) ENGINE = Distributed(test_shard_localhost, currentDatabase(), distr1); + +SELECT * FROM distr1; -- { serverError 306 } +SELECT * FROM distr2; -- { serverError 306 } + +DROP TABLE distr1; +DROP TABLE distr2;