[MDEV-30995] JSON_SCHEMA_VALID is not validating case sensitive when using regex Created: 2023-04-04  Updated: 2023-11-27  Resolved: 2023-04-13

Status: Closed
Project: MariaDB Server
Component/s: JSON
Affects Version/s: 11.1
Fix Version/s: 11.1.0

Type: Bug Priority: Critical
Reporter: Ramesh Sivaraman Assignee: Rucha Deodhar
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Problem/Incident
is caused by MDEV-27128 Implement JSON Schema Validation FUNC... Closed

 Description   

JSON_SCHEMA_VALID is not validating case sensitive when using regex

11.1.0-dbg>SET @schema='{
    '>    "type": "string",
    '>    "pattern": "[A-Z]"
    '> }';
Query OK, 0 rows affected (0.000 sec)
 
11.1.0-dbg>

Actual result

11.1.0-dbg>SELECT JSON_SCHEMA_VALID(@schema,'"a"');
+----------------------------------+
| JSON_SCHEMA_VALID(@schema,'"a"') |
+----------------------------------+
|                                1 |
+----------------------------------+
1 row in set (0.000 sec)

Expected result

11.1.0-dbg>SELECT JSON_SCHEMA_VALID(@schema,'"a"');
+----------------------------------+
| JSON_SCHEMA_VALID(@schema,'"a"') |
+----------------------------------+
|                                0 |
+----------------------------------+
1 row in set (0.000 sec)



 Comments   
Comment by Rucha Deodhar [ 2023-04-04 ]

Patch: https://github.com/MariaDB/server/tree/bb-MDEV-30995-json_schema

Comment by Alexey Botchkov [ 2023-04-09 ]

Ok to push with the comment addressed.

Comment by Rucha Deodhar [ 2023-04-13 ]

pushed to bb

Generated at Thu Feb 08 10:20:29 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.