Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-10665

Json_writer produces extra members in output

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 10.1
    • Fix Version/s: 10.1.17
    • Component/s: Optimizer
    • Labels:
      None

      Description

      There is a bug in the JSON pretty-printer:

         "tree": {
          "merges": [
            {
              "index_merge": {
                "tree": {
                  "ranges": ["c1(1)0"]
                },
                "tree": {
                  "ranges": ["c2(1)1"]
                }
              }
            },
            "ranges": "c2(1)1",  <--- this member was not intended to be printed
            {
              "index_merge": {
                "tree": {
                  "ranges": ["c1(1)2"]
                },
                "tree": {
                  "ranges": ["c2(1)3"]
                }
              }
            }
          ]
        }
      

      As far as I know, there is no way to observe the bug for a user.
      Json_writer is only used to produce ANALYZE|EXPLAIN FORMAT=JSON output. These documents have particular structure, and it doesn't allow to hit a bug.

      I've hit the bug by using Json_writer from extra debugging code.

        Attachments

          Activity

            People

            Assignee:
            psergei Sergei Petrunia
            Reporter:
            psergei Sergei Petrunia
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: