[MDEV-27035] Json_writer allows one to create duplicate object members Created: 2021-11-12  Updated: 2021-11-25  Resolved: 2021-11-25

Status: Closed
Project: MariaDB Server
Component/s: Optimizer
Affects Version/s: 10.4
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Sergei Petrunia Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None


 Description   

Json_writer code allows one to write multiple members with the same name in a JSON object.

This is likely to prevent proper processing of the created document.

The most striking example is EXPLAIN FORMAT=JSON:

{
  "query_block": {
    "select_id": 1,
    "table": {
      "table_name": "table",
      ...
    },
     "table": {
      ...



 Comments   
Comment by Elena Stepanova [ 2021-11-12 ]

The issue with duplicate names in JSON was discussed quite a lot when JSON functions were being introduced, and there were also remarks from users later. As far as I remember, at least at that time the conclusion was that JSON standards don't exactly prohibit members with duplicate names. Maybe something has changed since then.

Comment by Sergei Petrunia [ 2021-11-25 ]

Duplicate of MDEV-27036. Somehow, two identical issues got created.

Generated at Thu Feb 08 09:49:50 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.