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

Wrong encoding produced by JSON_ARRAYAGG

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.11.2, 10.5, 10.6, 10.8, 10.9, 10.10, 10.11
    • 10.5, 10.6, 10.11
    • 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

        Activity

          People

            holyfoot Alexey Botchkov
            lukas.eder Lukas Eder
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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