Bug 2169410 - [MariaDB 10.3] JSON_VALUE() does not parse NULL properties properly
Summary: [MariaDB 10.3] JSON_VALUE() does not parse NULL properties properly
Keywords:
Status: VERIFIED
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: mariadb
Version: 8.7
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Anton Bobrov
QA Contact: Jakub Heger
URL:
Whiteboard:
Depends On: 2217001
Blocks: 2223962
TreeView+ depends on / blocked
 
Reported: 2023-02-13 14:37 UTC by Paulo Andrade
Modified: 2023-08-09 05:54 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2223962 (view as bug list)
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-148465 0 None None None 2023-02-13 14:38:09 UTC

Description Paulo Andrade 2023-02-13 14:37:16 UTC
Issue reported upstream report at https://jira.mariadb.org/browse/MDEV-27151
also happens in rhel8.x mariadb.

User would like this issue patched.

Problem can be worked around, bug it is preferably to have it corrected in
the rhel package.

Comment 1 Michal Schorm 2023-05-15 09:52:49 UTC
Fixed by upstream in:
  https://github.com/MariaDB/server/commit/d48428e99aa7435ff72e2df7da05f35363e90ec3

The first upstream releases containing this fix should be:
  mariadb-10.5.18
  mariadb-10.3.37

Comment 4 Dominik Rehák 2023-08-09 05:54:56 UTC
Verified on 10.3.39 (expected output from reproducer matches).

mariadb-3:10.3.35-1.module+el8.6.0+15949+4ba4ec26:
 NULL
 NULL
 JSON_VALUE('{"nulltest": null}', '$.nulltest')
 null
 1 + NULL
 NULL
 1 + JSON_VALUE('{"nulltest": null}', '$.nulltest')
 1
 NULL
 NULL
 JSON_EXTRACT('{"a":null, "b":10, "c":"null"}', '$.a')
 null

mariadb-3:10.3.39-1.module+el8.8.0+19444+aac3c36b:
 NULL
 NULL
 JSON_VALUE('{"nulltest": null}', '$.nulltest')
 NULL
 1 + NULL
 NULL
 1 + JSON_VALUE('{"nulltest": null}', '$.nulltest')
 NULL
 NULL
 NULL
 JSON_EXTRACT('{"a":null, "b":10, "c":"null"}', '$.a')
 null


Note You need to log in before you can comment on or make changes to this bug.