-
Notifications
You must be signed in to change notification settings - Fork 3.8k
/
ptstablereader
112 lines (85 loc) · 1.31 KB
/
ptstablereader
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
exec-sql
CREATE DATABASE db;
CREATE TABLE db.t1();
CREATE TABLE db.t2();
----
query-sql
SELECT id FROM system.namespace WHERE name='db'
----
54
query-sql
SELECT id FROM system.namespace WHERE name='t1'
----
56
query-sql
SELECT id FROM system.namespace WHERE name='t2'
----
57
# Write a protected timestamp on t1.
protect id=1 ts=1
schemaObject 56
----
# Write a protected timestamp on t1 and t2.
protect id=2 ts=2
schemaObject 56,57
----
# Write a protected timestamp on db.
protect id=3 ts=3
schemaObject 54
----
# Write a protected timestamp on cluster.
protect id=4 ts=4
cluster
----
# Write a protected timestamp on tenant 1.
protect id=5 ts=5
tenant 1
----
# Write a protected timestamp on tenant 2.
protect id=6 ts=6
tenant 2
----
# Records on t1.
tablereader schemaObject=56
----
[ts=1 ts=2]
# Records on t2.
tablereader schemaObject=57
----
[ts=2]
# Records on db.
tablereader schemaObject=54
----
[ts=3]
tablereader cluster
----
[ts=4]
tablereader tenants
----
id=1 [ts=5]
id=2 [ts=6]
# Release a few records.
release id=5
----
release id=4
----
release id=3
----
# Records on t1.
tablereader schemaObject=56
----
[ts=1 ts=2]
# Records on t2.
tablereader schemaObject=57
----
[ts=2]
# Records on db.
tablereader schemaObject=54
----
[]
tablereader cluster
----
[]
tablereader tenants
----
id=2 [ts=6]