forked from MaterializeInc/materialize
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathid_reuse.slt
121 lines (96 loc) · 1.81 KB
/
id_reuse.slt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# 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
u6 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
u7 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
----
s1 mz_system
s2 mz_support
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
----
s1 mz_system
s2 mz_support
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_introspection
u1 default
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_introspection
u1 default
u3 bar