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

JSON histograms become invalid due to not properly quoted values

    XMLWordPrintable

Details

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

    Description

      JSON histograms turn out invalid if a column value contains, for example, a double quote mark.

      create or replace table t (a varchar(32));
      insert into t values ('this is "quoted" text');
      set histogram_type= JSON_HB;
      analyze table t persistent for all;
      select * from t where a = 'foo';
       
      # Cleanup
      drop table t;
      

      preview-10.7-MDEV-26519-json-histograms da8bb4b4703

      MariaDB [test]> select * from t where a = 'foo';
      ERROR 4183 (HY000): Failed to parse histogram: Root JSON element must be a JSON object at offset 0.
      

      Attachments

        Issue Links

          Activity

            People

              psergei Sergei Petrunia
              elenst Elena Stepanova
              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.