[MDEV-30704] JSON_SCHEMA_VALID: multipleOf must be greater than zero Created: 2023-02-21  Updated: 2023-11-27  Resolved: 2023-04-21

Status: Closed
Project: MariaDB Server
Component/s: JSON
Affects Version/s: None
Fix Version/s: 11.1.1

Type: Bug Priority: Major
Reporter: Lena Startseva 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   

multipleOf

The value of "multipleOf" MUST be a number, strictly greater than 0.

https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.6.2.1

Case:

SET @schema = '{
                  "multipleOf": 0
                }';
SELECT JSON_SCHEMA_VALID(@schema, '2');

Expected that there will be a warning, but actual result is:

JSON_SCHEMA_VALID(@schema, '2')
0

Also maybe a value like 0.1("multipleOf": 0.1) needs to be checked but I'm not sure



 Comments   
Comment by Rucha Deodhar [ 2023-03-02 ]

patch: https://github.com/MariaDB/server/tree/bb-MDEV-30704-json_shema

Comment by Alexey Botchkov [ 2023-04-20 ]

ok to push.

Comment by Rucha Deodhar [ 2023-04-21 ]

Pushed to: https://github.com/MariaDB/server/tree/bb-10.12-MDEV-27128

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