diff --git a/tests/queries/0_stateless/01275_parallel_mv.reference b/tests/queries/0_stateless/01275_parallel_mv.reference index 898d3f7266e..a5987acafde 100644 --- a/tests/queries/0_stateless/01275_parallel_mv.reference +++ b/tests/queries/0_stateless/01275_parallel_mv.reference @@ -1,4 +1,27 @@ +-- { echoOn } +set parallel_view_processing=1; +insert into testX select number from numbers(10) settings log_queries=1; -- { serverError FUNCTION_THROW_IF_VALUE_IS_NON_ZERO } +system flush logs; +select length(thread_ids) from system.query_log where current_database = currentDatabase() and type != 'QueryStart' and query like '%insert into testX %' and Settings['parallel_view_processing'] = '1'; +8 +select count() from testX; 10 +select count() from testXA; 10 +select count() from testXB; 0 +select count() from testXC; 10 +set parallel_view_processing=0; +insert into testX select number from numbers(10) settings log_queries=1; -- { serverError FUNCTION_THROW_IF_VALUE_IS_NON_ZERO } +system flush logs; +select length(thread_ids) from system.query_log where current_database = currentDatabase() and type != 'QueryStart' and query like '%insert into testX %' and Settings['parallel_view_processing'] = '0'; +5 +select count() from testX; +20 +select count() from testXA; +20 +select count() from testXB; +0 +select count() from testXC; +20 diff --git a/tests/queries/0_stateless/01275_parallel_mv.sql b/tests/queries/0_stateless/01275_parallel_mv.sql index 5d4dffae50a..32b43ce616f 100644 --- a/tests/queries/0_stateless/01275_parallel_mv.sql +++ b/tests/queries/0_stateless/01275_parallel_mv.sql @@ -9,14 +9,28 @@ create materialized view testXA engine=MergeTree order by tuple() as select slee create materialized view testXB engine=MergeTree order by tuple() as select sleep(2), throwIf(A=1) from testX; create materialized view testXC engine=MergeTree order by tuple() as select sleep(1) from testX; +-- { echoOn } set parallel_view_processing=1; -insert into testX select number from numbers(10); -- {serverError 395} +insert into testX select number from numbers(10) settings log_queries=1; -- { serverError FUNCTION_THROW_IF_VALUE_IS_NON_ZERO } +system flush logs; +select length(thread_ids) from system.query_log where current_database = currentDatabase() and type != 'QueryStart' and query like '%insert into testX %' and Settings['parallel_view_processing'] = '1'; select count() from testX; select count() from testXA; select count() from testXB; select count() from testXC; +set parallel_view_processing=0; +insert into testX select number from numbers(10) settings log_queries=1; -- { serverError FUNCTION_THROW_IF_VALUE_IS_NON_ZERO } +system flush logs; +select length(thread_ids) from system.query_log where current_database = currentDatabase() and type != 'QueryStart' and query like '%insert into testX %' and Settings['parallel_view_processing'] = '0'; + +select count() from testX; +select count() from testXA; +select count() from testXB; +select count() from testXC; +-- { echoOff } + drop table testX; drop view testXA; drop view testXB;