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

Json_writer produces extra members in output

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Trivial
    • Resolution: Fixed
    • 10.1(EOL)
    • 10.1.17
    • Optimizer
    • 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

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

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.