File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
tests/queries/0_stateless Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 1- no_transaction_landing 10000
2- no_transaction_target 0
1+ no_transaction_landing 1
2+ no_transaction_target 1
33after_transaction_landing 0
44after_transaction_target 0
55after_implicit_txn_in_query_settings_landing 0
Original file line number Diff line number Diff line change 11-- Tags: no-ordinary-database, no-fasttest
2+ DROP TABLE IF EXISTS landing_to_target;
3+ DROP TABLE IF EXISTS target;
4+ DROP TABLE IF EXISTS landing;
25
36CREATE TABLE landing (n Int64) engine= MergeTree order by n;
47CREATE TABLE target (n Int64) engine= MergeTree order by n;
58CREATE MATERIALIZED VIEW landing_to_target TO target AS
69 SELECT n + throwIf(n == 3333 ) AS n
710 FROM landing;
811
9- INSERT INTO landing SELECT * FROM numbers(10000 ); -- { serverError FUNCTION_THROW_IF_VALUE_IS_NON_ZERO }
10- SELECT ' no_transaction_landing' , count () FROM landing;
11- SELECT ' no_transaction_target' , count () FROM target;
12+ -- There is no gurantee what is inserted in case if exception
13+ -- That initial check is meaninglessness
14+ -- We only sure that if the internal mv's exception is ignored then all the data is inserted to the table landing
15+ INSERT INTO landing SELECT * FROM numbers(10000 ) SETTINGS materialized_views_ignore_errors= 1 ;
16+ SELECT ' no_transaction_landing' , count () = 10000 FROM landing;
17+ SELECT ' no_transaction_target' , count () < 10000 FROM target;
1218
1319TRUNCATE TABLE landing;
1420TRUNCATE TABLE target;
You can’t perform that action at this time.
0 commit comments