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

Optimizer_trace has invalid JSON near rows_estimation

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • N/A
    • N/A
    • Optimizer
    • None

    Description

      I thought that improvements to JSON writer would make this impossible, but
      somehow they didn't?

      create table ten(a int);
      insert into ten values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
      set optimizer_trace=1;
      select * from ten where a<3 ;
      

      produces:

              "steps": [
                {
                   ...
                },
                ...
                {
                  "ref_optimizer_key_uses": []
                },
                "rows_estimation": [
                  {
                    "selectivity_for_indexes": [],
                    "selectivity_for_columns": []
                  },
                  {
                    "table": "ten",
                    "table_scan": {
                      "rows": 10,
                      "cost": 1
                    }
                  }
                ],
      

      Note that "rows_estimation" is a named element, but it is in the "steps" array.

      Attachments

        Issue Links

          Activity

            People

              varun Varun Gupta (Inactive)
              psergei Sergei Petrunia
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.