-
Notifications
You must be signed in to change notification settings - Fork 4k
/
Copy pathadmin_get_collection_options.result
150 lines (121 loc) · 3.28 KB
/
admin_get_collection_options.result
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
CREATE SCHEMA xtest;
CREATE USER test_user@localhost;
## I. Check invalid option setting for get_collection_options command.
#
# 1. Check just an invalid option.
# 2. Check both valid and invalid options.
## II. Check get_collection_options when used for not existing schema.
## III. Check get_collection_options that returns a validation.
#
# 1. Get default validation schema.
# 2. Get custom validation schema.
# 3. Get custom validation schema and non-default validation level.
# 4. Check command that returns string with special characters.
## IV. Get option for a collection user has no access to.
#
# 1. Collection does not exist.
# 2. Collection exists.
## V. Check Mysqlx_stmt_get_collection_options variable.
#
# I.1
Got expected error: Requested collection option 'foo' doesn't exist. (code 5181)
#
# I.2
Got expected error: Requested collection option 'foo' doesn't exist. (code 5181)
# I.3
Got expected error: Invalid value for argument 'options' (code 5017)
# I.4
Got expected error: Invalid value for argument 'options[0]' (code 5017)
# I.5
Got expected error: Invalid value for argument 'options[0]' (code 5017)
#
# II
Got expected error: Table 'xtest.test_coll' doesn't exist (code 1146)
#
# III.1
command ok
Result
{ "validation": { "level": "off", "schema": {"type":"object"} } }
command ok
RUN DROP TABLE IF EXISTS xtest.test_coll
0 rows affected
#
# III.2
command ok
Result
{ "validation": { "level": "strict", "schema": {"description":"test"} } }
command ok
RUN DROP TABLE IF EXISTS xtest.test_coll
0 rows affected
#
# III.3
command ok
Result
{ "validation": { "level": "off", "schema": {"description":"test"} } }
command ok
RUN DROP TABLE IF EXISTS xtest.test_coll
0 rows affected
#
# III.4
command ok
Result
{ "validation": { "level": "strict", "schema": {"description":"t`y\\\\p"e o`b`\\\\\\\\c""t"} } }
command ok
RUN DROP TABLE IF EXISTS xtest.test_coll
0 rows affected
#
# IV.1
connecting...
active session is now 'temp'
Got expected error: SELECT command denied to user 'test_user'@'localhost' for table 'test_coll' (code 1142)
closing session temp
Mysqlx.Ok {
msg: "bye!"
}
switched to session default
#
# IV.2
command ok
connecting...
active session is now 'temp'
Got expected error: SELECT command denied to user 'test_user'@'localhost' for table 'test_coll' (code 1142)
closing session temp
Mysqlx.Ok {
msg: "bye!"
}
switched to session default
RUN DROP TABLE IF EXISTS xtest.test_coll
0 rows affected
#
# V
connecting...
active session is now 'temp'
command ok
Verify [Status variable "Mysqlx_stmt_get_collection_options" needs to have a value of 0]
Result
{ "validation": { "level": "off", "schema": {"type":"object"} } }
command ok
Verify [Status variable "Mysqlx_stmt_get_collection_options" needs to have a value of 1]
Got expected error:
Mysqlx.Error {
severity: ERROR
code: 5181
msg: "Requested collection option \'foo\' doesn\'t exist."
sql_state: "HY000"
}
Verify [Status variable "Mysqlx_stmt_get_collection_options" needs to have a value of 2]
Result
{ "validation": { "level": "off", "schema": {"type":"object"} } }
command ok
Verify [Status variable "Mysqlx_stmt_get_collection_options" needs to have a value of 3]
0 rows affected
closing session temp
Mysqlx.Ok {
msg: "bye!"
}
switched to session default
Mysqlx.Ok {
msg: "bye!"
}
ok
DROP USER test_user@localhost;