summaryrefslogtreecommitdiff
path: root/mysql-test/main/func_json.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/main/func_json.test')
-rw-r--r--mysql-test/main/func_json.test21
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/main/func_json.test b/mysql-test/main/func_json.test
index 5517dcfa6c8..4a400f1de90 100644
--- a/mysql-test/main/func_json.test
+++ b/mysql-test/main/func_json.test
@@ -3398,6 +3398,27 @@ SET @schema_required='{"type":"object","required":[1,"str1", "str1"]}';
--error ER_JSON_INVALID_VALUE_FOR_KEYWORD
SELECT JSON_SCHEMA_VALID(@schema_required,'{"num1":1, "str1":"abc", "arr1":[1,2,3]}');
+--echo #
+--echo # MDEV-30977: Additional key values are not validating properly when using
+--echo # unevaluatedProperties with properties declared in subschemas
+--echo #
+
+SET @unevaluatedProperties_schema= '{
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "name": { "type": "string" }
+ }
+ }
+ ],
+ "properties": {
+ "type": { "enum": ["residential", "business"] }
+ },
+ "required": ["type"],
+ "unevaluatedProperties": false
+}';
+SELECT JSON_SCHEMA_VALID(@unevaluatedProperties_schema, '{"name": "joe", "type": "business", "dummy" : "hello" }');
--echo #
--echo # MDEV-30995: JSON_SCHEMA_VALID is not validating case sensitive when using regex