[MDEV-32587] JSON_VALID fail to validate integer zero in scientific notation Created: 2023-10-26  Updated: 2024-01-20  Resolved: 2024-01-18

Status: Closed
Project: MariaDB Server
Component/s: JSON
Affects Version/s: 10.5.22
Fix Version/s: 10.4.33, 10.5.24, 10.6.17, 10.11.7, 11.0.5, 11.1.4, 11.2.3

Type: Bug Priority: Critical
Reporter: Marco Benuzzi Assignee: Rucha Deodhar
Resolution: Fixed Votes: 0
Labels: None
Environment:

rocky linux 9



 Description   
query result expected
select JSON_VALID(' {"number": 1E-4}

');

1 1
select JSON_VALID(' {"number": 0E-4}

');

0 1
select JSON_VALID(' {"number": 0.0}

');

1 1

0E-4 is a valid number and should be validated

All other json validators tested accept zero in scientific notation.



 Comments   
Comment by Robin Newhouse [ 2023-12-07 ]

https://github.com/MariaDB/server/pull/2910

Comment by Rucha Deodhar [ 2024-01-18 ]

Review done. Pushed to 10.4. Thanks !

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