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

Wrong encoding produced by JSON_ARRAYAGG

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 10.5, 10.6, 10.11, 10.11.2, 10.8(EOL), 10.9(EOL), 10.10(EOL)
    • N/A
    • JSON
    • None

    Description

      Try this query:

      select 
        json_arrayagg(json_array(ö)),
        json_arrayagg(json_object(ö, ö)), 
        json_arrayagg(ö)
      from (select 'ö' ö) ö;
      

      It produces

      |json_arrayagg(json_array(ö))|json_arrayagg(json_object(ö, ö))|json_arrayagg(ö)|
      |----------------------------|--------------------------------|----------------|
      |[["ö"]]                     |[{"ö": "ö"}]                    |["�"]           |
      

      So, when JSON is nested in JSON, then there's no encoding problem, but a string embedded directly into JSON_ARRAYAGG produces issues.

      Attachments

        Issue Links

          Activity

            People

              holyfoot Alexey Botchkov
              lukas.eder Lukas Eder
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.