diff --git a/dbms/tests/queries/0_stateless/00180_attach_materialized_view.reference b/dbms/tests/queries/0_stateless/00180_attach_materialized_view.reference new file mode 100644 index 00000000000..e69de29bb2d diff --git a/dbms/tests/queries/0_stateless/00180_attach_materialized_view.sql b/dbms/tests/queries/0_stateless/00180_attach_materialized_view.sql new file mode 100644 index 00000000000..81b162ee4dd --- /dev/null +++ b/dbms/tests/queries/0_stateless/00180_attach_materialized_view.sql @@ -0,0 +1,12 @@ +DROP TABLE IF EXISTS test.t; +DROP TABLE IF EXISTS test.mv; +DROP TABLE IF EXISTS test.`.inner.mv`; + +CREATE TABLE test.t (x UInt8) ENGINE = Null; +CREATE MATERIALIZED VIEW test.mv AS SELECT * FROM test.t; + +DETACH TABLE test.mv; +ATTACH MATERIALIZED VIEW test.mv AS SELECT * FROM test.t; + +DROP TABLE test.t; +DROP TABLE test.mv;