| 1 |
create schema xtest; |
| 2 |
|
| 3 |
|
| 4 |
## I. Check validation errors on collection insert. |
| 5 |
# |
| 6 |
# 1. Insert one invalid value to an empty collection. |
| 7 |
# 2. Insert one invalid value to a non-empty collection. |
| 8 |
# 3. Insert multiple values where one is invalid. |
| 9 |
# 4. Insert multiple invalid values. |
| 10 |
|
| 11 |
## II. Check validation errors on collection update. |
| 12 |
# 1. Update one element in a collection. |
| 13 |
# 2. Update multiple elements in a collection. |
| 14 |
|
| 15 |
## III. Check validation errors on schema enable. |
| 16 |
# 1. Enable schema for collection with one element not matching the |
| 17 |
# schema. |
| 18 |
# 2. Enable schema for collection with multiple elements not matching |
| 19 |
# the schema. |
| 20 |
|
| 21 |
## IV. Check validation errors on schema update. |
| 22 |
# 1. Update schema for collection with one element not matching the |
| 23 |
# new schema. |
| 24 |
# 2. Update schema for collection with multiple elements not matching |
| 25 |
# the new schema. |
| 26 |
|
| 27 |
# |
| 28 |
# I.1 |
| 29 |
|
| 30 |
command ok |
| 31 |
Mysqlx.Error { |
| 32 |
severity: ERROR |
| 33 |
code: 5180 |
| 34 |
msg: "Document is not valid according to the schema assigned to collection. The JSON document location \'#/size\' failed requirement \'maximum\' at JSON Schema location \'#/properties/size\'." |
| 35 |
sql_state: "HY000" |
| 36 |
} |
| 37 |
|
| 38 |
|
| 39 |
0 rows affected |
| 40 |
|
| 41 |
# |
| 42 |
# I.2 |
| 43 |
|
| 44 |
command ok |
| 45 |
|
| 46 |
1 rows affected |
| 47 |
|
| 48 |
1 rows affected |
| 49 |
|
| 50 |
1 rows affected |
| 51 |
Mysqlx.Error { |
| 52 |
severity: ERROR |
| 53 |
code: 5180 |
| 54 |
msg: "Document is not valid according to the schema assigned to collection. The JSON document location \'#/size\' failed requirement \'minimum\' at JSON Schema location \'#/properties/size\'." |
| 55 |
sql_state: "HY000" |
| 56 |
} |
| 57 |
|
| 58 |
|
| 59 |
0 rows affected |
| 60 |
|
| 61 |
# |
| 62 |
# I.3 |
| 63 |
|
| 64 |
command ok |
| 65 |
Mysqlx.Error { |
| 66 |
severity: ERROR |
| 67 |
code: 5180 |
| 68 |
msg: "Document is not valid according to the schema assigned to collection. The JSON document location \'#/size\' failed requirement \'minimum\' at JSON Schema location \'#/properties/size\'." |
| 69 |
sql_state: "HY000" |
| 70 |
} |
| 71 |
|
| 72 |
|
| 73 |
0 rows affected |
| 74 |
|
| 75 |
# |
| 76 |
# I.4 |
| 77 |
|
| 78 |
command ok |
| 79 |
Mysqlx.Error { |
| 80 |
severity: ERROR |
| 81 |
code: 5180 |
| 82 |
msg: "Document is not valid according to the schema assigned to collection. The JSON document location \'#/size\' failed requirement \'maximum\' at JSON Schema location \'#/properties/size\'." |
| 83 |
sql_state: "HY000" |
| 84 |
} |
| 85 |
|
| 86 |
|
| 87 |
0 rows affected |
| 88 |
|
| 89 |
# |
| 90 |
# II.1 |
| 91 |
|
| 92 |
command ok |
| 93 |
|
| 94 |
1 rows affected |
| 95 |
|
| 96 |
1 rows affected |
| 97 |
|
| 98 |
1 rows affected |
| 99 |
Mysqlx.Error { |
| 100 |
severity: ERROR |
| 101 |
code: 5180 |
| 102 |
msg: "Document is not valid according to the schema assigned to collection. The JSON document location \'#/size\' failed requirement \'minimum\' at JSON Schema location \'#/properties/size\'." |
| 103 |
sql_state: "HY000" |
| 104 |
} |
| 105 |
|
| 106 |
|
| 107 |
0 rows affected |
| 108 |
|
| 109 |
# |
| 110 |
# II.2 |
| 111 |
|
| 112 |
command ok |
| 113 |
|
| 114 |
1 rows affected |
| 115 |
|
| 116 |
1 rows affected |
| 117 |
|
| 118 |
1 rows affected |
| 119 |
Mysqlx.Error { |
| 120 |
severity: ERROR |
| 121 |
code: 5180 |
| 122 |
msg: "Document is not valid according to the schema assigned to collection. The JSON document location \'#/size\' failed requirement \'minimum\' at JSON Schema location \'#/properties/size\'." |
| 123 |
sql_state: "HY000" |
| 124 |
} |
| 125 |
|
| 126 |
|
| 127 |
0 rows affected |
| 128 |
|
| 129 |
# |
| 130 |
# III.1 |
| 131 |
|
| 132 |
command ok |
| 133 |
|
| 134 |
1 rows affected |
| 135 |
|
| 136 |
1 rows affected |
| 137 |
|
| 138 |
1 rows affected |
| 139 |
Mysqlx.Error { |
| 140 |
severity: ERROR |
| 141 |
code: 5180 |
| 142 |
msg: "Document is not valid according to the schema assigned to collection. The JSON document location \'#/size\' failed requirement \'minimum\' at JSON Schema location \'#/properties/size\'." |
| 143 |
sql_state: "HY000" |
| 144 |
} |
| 145 |
|
| 146 |
|
| 147 |
0 rows affected |
| 148 |
|
| 149 |
# |
| 150 |
# III.2 |
| 151 |
|
| 152 |
command ok |
| 153 |
|
| 154 |
1 rows affected |
| 155 |
|
| 156 |
1 rows affected |
| 157 |
|
| 158 |
1 rows affected |
| 159 |
Mysqlx.Error { |
| 160 |
severity: ERROR |
| 161 |
code: 5180 |
| 162 |
msg: "Document is not valid according to the schema assigned to collection. The JSON document location \'#/size\' failed requirement \'maximum\' at JSON Schema location \'#/properties/size\'." |
| 163 |
sql_state: "HY000" |
| 164 |
} |
| 165 |
|
| 166 |
|
| 167 |
0 rows affected |
| 168 |
|
| 169 |
# |
| 170 |
# IV.1 |
| 171 |
|
| 172 |
command ok |
| 173 |
|
| 174 |
1 rows affected |
| 175 |
|
| 176 |
1 rows affected |
| 177 |
|
| 178 |
1 rows affected |
| 179 |
Mysqlx.Error { |
| 180 |
severity: ERROR |
| 181 |
code: 5180 |
| 182 |
msg: "Document is not valid according to the schema assigned to collection. The JSON document location \'#/size\' failed requirement \'minimum\' at JSON Schema location \'#/properties/size\'." |
| 183 |
sql_state: "HY000" |
| 184 |
} |
| 185 |
|
| 186 |
|
| 187 |
0 rows affected |
| 188 |
|
| 189 |
# |
| 190 |
# IV.2 |
| 191 |
|
| 192 |
command ok |
| 193 |
|
| 194 |
1 rows affected |
| 195 |
|
| 196 |
1 rows affected |
| 197 |
|
| 198 |
1 rows affected |
| 199 |
Mysqlx.Error { |
| 200 |
severity: ERROR |
| 201 |
code: 5180 |
| 202 |
msg: "Document is not valid according to the schema assigned to collection. The JSON document location \'#/size\' failed requirement \'minimum\' at JSON Schema location \'#/properties/size\'." |
| 203 |
sql_state: "HY000" |
| 204 |
} |
| 205 |
|
| 206 |
|
| 207 |
0 rows affected |
| 208 |
Mysqlx.Ok { |
| 209 |
msg: "bye!" |
| 210 |
} |
| 211 |
ok |