# 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 cluster ids aren't reused. mode cockroach # Requires stable ids reset-server statement ok CREATE SCHEMA foo query TT rowsort SELECT id, name FROM mz_schemas ---- s1 mz_catalog s2 pg_catalog u3 public s4 mz_internal s5 information_schema s6 mz_unsafe s7 mz_catalog_unstable s8 mz_introspection u9 foo statement ok DROP schema foo statement ok DROP SCHEMA IF EXISTS foo, bar statement ok CREATE schema bar query TT rowsort SELECT id, name FROM mz_schemas ---- s1 mz_catalog s2 pg_catalog u3 public s4 mz_internal s5 information_schema s6 mz_unsafe s7 mz_catalog_unstable s8 mz_introspection u10 bar statement ok CREATE DATABASE foo query TT rowsort SELECT id, name FROM mz_databases ---- u1 materialize u2 foo statement ok DROP DATABASE foo statement ok CREATE DATABASE bar query TT rowsort SELECT id, name FROM mz_databases ---- u1 materialize u3 bar statement ok CREATE ROLE foo query TT rowsort SELECT id, name FROM mz_roles ---- g1 mz_monitor g2 mz_monitor_redacted s1 mz_system s2 mz_support s3 mz_analytics u1 materialize u2 foo statement ok DROP ROLE foo statement ok DROP ROLE IF EXISTS foo, bar, foo statement ok CREATE ROLE bar query TT rowsort SELECT id, name FROM mz_roles ---- g1 mz_monitor g2 mz_monitor_redacted s1 mz_system s2 mz_support s3 mz_analytics u1 materialize u3 bar statement ok CREATE CLUSTER foo REPLICAS (r1 (size '1')) query TT rowsort SELECT id, name FROM mz_clusters ---- s1 mz_system s2 mz_catalog_server s3 mz_probe s4 mz_support s5 mz_analytics u1 quickstart u2 foo statement ok DROP CLUSTER foo CASCADE statement ok CREATE CLUSTER bar REPLICAS (r1 (size '1')) query TT rowsort SELECT id, name FROM mz_clusters ---- s1 mz_system s2 mz_catalog_server s3 mz_probe s4 mz_support s5 mz_analytics u1 quickstart u3 bar