Bug #71949 JSON_VALID does not reject invalid documents
Submitted: 5 Mar 2014 20:29 Modified: 12 Mar 2014 18:12
Reporter: Sveta Smirnova Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: JSON User-defined function ( UDF ) Severity:S3 (Non-critical)
Version:0.3.1 OS:Any
Assigned to:
Triage: Needs Triage: D2 (Serious)

[5 Mar 2014 20:29] Sveta Smirnova
Description:
If there is no separator between array elements JSON_VALID still considers such documents as valid.

How to repeat:
select json_valid('[1, 2 3]');
json_valid('[1, 2 3]')
1
select json_valid('{"foo": "bar" "baz": "ban"}');
json_valid('{"foo": "bar" "baz": "ban"}')
1

Suggested fix:
Should return 0 in both cases.
[12 Mar 2014 18:12] Sveta Smirnova
Posted by developer:
 
Fixed in version 0.3.1