diff --git a/dbms/tests/queries/0_stateless/00726_materialized_view_concurrent.sql b/dbms/tests/queries/0_stateless/00726_materialized_view_concurrent.sql index c737642f4b7..3c03f97cfe9 100644 --- a/dbms/tests/queries/0_stateless/00726_materialized_view_concurrent.sql +++ b/dbms/tests/queries/0_stateless/00726_materialized_view_concurrent.sql @@ -1,20 +1,20 @@ -DROP TABLE IF EXISTS src; -DROP TABLE IF EXISTS mv1; -DROP TABLE IF EXISTS mv2; +DROP TABLE IF EXISTS src_00726; +DROP TABLE IF EXISTS mv1_00726; +DROP TABLE IF EXISTS mv2_00726; -CREATE TABLE src (x UInt8) ENGINE = Null; -CREATE MATERIALIZED VIEW mv1 ENGINE = Memory AS SELECT x FROM src WHERE x % 2 = 0; -CREATE MATERIALIZED VIEW mv2 ENGINE = Memory AS SELECT x FROM src WHERE x % 2 = 1; +CREATE TABLE src_00726 (x UInt8) ENGINE = Null; +CREATE MATERIALIZED VIEW mv1_00726 ENGINE = Memory AS SELECT x FROM src_00726 WHERE x % 2 = 0; +CREATE MATERIALIZED VIEW mv2_00726 ENGINE = Memory AS SELECT x FROM src_00726 WHERE x % 2 = 1; SET parallel_view_processing = 1; -INSERT INTO src VALUES (1), (2); +INSERT INTO src_00726 VALUES (1), (2); SET parallel_view_processing = 0; -INSERT INTO src VALUES (3), (4); +INSERT INTO src_00726 VALUES (3), (4); -SELECT * FROM mv1 ORDER BY x; -SELECT * FROM mv2 ORDER BY x; +SELECT * FROM mv1_00726 ORDER BY x; +SELECT * FROM mv2_00726 ORDER BY x; -DROP TABLE mv1; -DROP TABLE mv2; -DROP TABLE src; +DROP TABLE mv1_00726; +DROP TABLE mv2_00726; +DROP TABLE src_00726; diff --git a/dbms/tests/queries/0_stateless/00942_mv_rename_table.sql b/dbms/tests/queries/0_stateless/00942_mv_rename_table.sql index 168af02e4e3..c0531d98b67 100644 --- a/dbms/tests/queries/0_stateless/00942_mv_rename_table.sql +++ b/dbms/tests/queries/0_stateless/00942_mv_rename_table.sql @@ -1,19 +1,19 @@ -DROP TABLE IF EXISTS src; -DROP TABLE IF EXISTS view_table; -DROP TABLE IF EXISTS new_view_table; +DROP TABLE IF EXISTS src_00942; +DROP TABLE IF EXISTS view_table_00942; +DROP TABLE IF EXISTS new_view_table_00942; -CREATE TABLE src (x UInt8) ENGINE = Null; +CREATE TABLE src_00942 (x UInt8) ENGINE = Null; -CREATE MATERIALIZED VIEW view_table Engine = Memory AS SELECT * FROM src; +CREATE MATERIALIZED VIEW view_table_00942 Engine = Memory AS SELECT * FROM src_00942; -INSERT INTO src VALUES (1), (2), (3); -SELECT * FROM view_table ORDER BY x; +INSERT INTO src_00942 VALUES (1), (2), (3); +SELECT * FROM view_table_00942 ORDER BY x; --Check if we can rename the view and if we can still fetch datas -RENAME TABLE view_table TO new_view_table; -SELECT * FROM new_view_table ORDER BY x; +RENAME TABLE view_table_00942 TO new_view_table_00942; +SELECT * FROM new_view_table_00942 ORDER BY x; -DROP TABLE src; -DROP TABLE IF EXISTS view_table; -DROP TABLE IF EXISTS new_view_table; +DROP TABLE src_00942; +DROP TABLE IF EXISTS view_table_00942; +DROP TABLE IF EXISTS new_view_table_00942; diff --git a/dbms/tests/queries/0_stateless/01019_alter_materialized_view_query.sql b/dbms/tests/queries/0_stateless/01019_alter_materialized_view_query.sql index d6a40671dc4..0011f5be522 100644 --- a/dbms/tests/queries/0_stateless/01019_alter_materialized_view_query.sql +++ b/dbms/tests/queries/0_stateless/01019_alter_materialized_view_query.sql @@ -1,35 +1,35 @@ -DROP TABLE IF EXISTS src; -DROP TABLE IF EXISTS dest; -DROP TABLE IF EXISTS pipe; +DROP TABLE IF EXISTS src_01019; +DROP TABLE IF EXISTS dest_01019; +DROP TABLE IF EXISTS pipe_01019; -CREATE TABLE src(v UInt64) ENGINE = Null; -CREATE TABLE dest(v UInt64) Engine = MergeTree() ORDER BY v; +CREATE TABLE src_01019(v UInt64) ENGINE = Null; +CREATE TABLE dest_01019(v UInt64) Engine = MergeTree() ORDER BY v; -CREATE MATERIALIZED VIEW pipe TO dest AS -SELECT v FROM src; +CREATE MATERIALIZED VIEW pipe_01019 TO dest_01019 AS +SELECT v FROM src_01019; -INSERT INTO src VALUES (1), (2), (3); +INSERT INTO src_01019 VALUES (1), (2), (3); SET allow_experimental_alter_materialized_view_structure = 1; -- Live alter which changes query logic and adds an extra column. -ALTER TABLE pipe +ALTER TABLE pipe_01019 MODIFY QUERY SELECT v * 2 as v, 1 as v2 - FROM src; + FROM src_01019; -INSERT INTO src VALUES (1), (2), (3); +INSERT INTO src_01019 VALUES (1), (2), (3); -SELECT * FROM dest ORDER BY v; +SELECT * FROM dest_01019 ORDER BY v; -ALTER TABLE dest +ALTER TABLE dest_01019 ADD COLUMN v2 UInt64; -INSERT INTO src VALUES (42); -SELECT * FROM dest ORDER BY v; +INSERT INTO src_01019 VALUES (42); +SELECT * FROM dest_01019 ORDER BY v; -DROP TABLE src; -DROP TABLE dest; -DROP TABLE pipe; +DROP TABLE src_01019; +DROP TABLE dest_01019; +DROP TABLE pipe_01019;