123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- # Copyright Materialize, Inc. and contributors. All rights reserved.
- #
- # Use of this software is governed by the Business Source License
- # included in the LICENSE file at the root of this repository.
- #
- # As of the Change Date specified in that file, in accordance with
- # the Business Source License, use of this software will be governed
- # by the Apache License, Version 2.0.
- # Test that subscribes propagate query errors.
- mode cockroach
- statement ok
- CREATE TABLE t (a int)
- statement ok
- INSERT INTO t VALUES (1), (2), (0)
- statement ok
- CREATE VIEW v AS SELECT 1/a FROM t
- statement ok
- CREATE DEFAULT INDEX ON v
- statement ok
- CREATE MATERIALIZED VIEW mv AS SELECT 1/a FROM t
- statement ok
- BEGIN
- statement ok
- DECLARE c CURSOR FOR SUBSCRIBE (SELECT 1/a FROM t)
- statement error Evaluation error: division by zero
- FETCH 1 c
- statement ok
- ROLLBACK
- statement ok
- BEGIN
- statement ok
- DECLARE c CURSOR FOR SUBSCRIBE v
- statement error Evaluation error: division by zero
- FETCH 1 c
- statement ok
- ROLLBACK
- statement ok
- BEGIN
- statement ok
- DECLARE c CURSOR FOR SUBSCRIBE mv
- statement error Evaluation error: division by zero
- FETCH 1 c
- statement ok
- ROLLBACK
|