Bug #71530 JSON_EXTRACT returns wrong result in version 0.3

Submitted: 30 Jan 2014 16:39 Modified: 27 Feb 2014 11:54
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.0, 0.3.1 OS:Any
Assigned to: CPU Architecture:Any

[30 Jan 2014 16:39] Sveta Smirnova
Description:
Created from a comment to bug #70393

Can't extract deeper after first element in array in version 0.3

How to repeat:
set @json = '[{"a":1,"b":2}, {"a":3,"b":4}]';
select CAST(json_extract(@json, 0, 'a') AS CHAR(10000));

returns: 1

set @json = '[{"a":1,"b":2}, {"a":3,"b":4}]';
select CAST(json_extract(@json, 1, 'a') AS CHAR(10000));

returns: NULL
expected: 3
[27 Feb 2014 11:53] Sveta Smirnova
Posted by developer:
 
Fixed in version 0.3.1

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.038 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.