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

View created via JSON_ARRAYAGG returns incorrect json object

Details

    Description

      Case repeats only in 10.5:

      Test case:

      CREATE VIEW v1 AS SELECT JSON_OBJECT(_LATIN1 'plugin', _LATIN1'unix_socket') as v1_json;
      SELECT JSON_ARRAYAGG(v1_json) FROM v1;
      DROP VIEW v1;
       
      CREATE VIEW v1 AS SELECT JSON_OBJECT('plugin','unix_socket') as v1_json;
      SELECT JSON_ARRAYAGG(v1_json) FROM v1;
      DROP VIEW v1;
      

      Expected result:

      JSON_ARRAYAGG(v1_json)
      [{"plugin": "unix_socket"}]
       
      JSON_ARRAYAGG(v1_json)
      [{"plugin": "unix_socket"}]
      

      Actual result:

      JSON_ARRAYAGG(v1_json)
      ["{\"plugin\": \"unix_socket\"}"]
       
      JSON_ARRAYAGG(v1_json)
      ["{\"plugin\": \"unix_socket\"}"]
      

      Attachments

        Issue Links

          Activity

            Transition Time In Source Status Execution Times
            Rucha Deodhar made transition -
            Open In Progress
            420d 2h 4m 1
            Rucha Deodhar made transition -
            In Progress In Review
            10s 1
            Alexey Botchkov made transition -
            In Review Stalled
            6d 21h 27m 1
            Alexander Barkov made transition -
            Stalled Closed
            13d 23h 59m 1

            People

              bar Alexander Barkov
              lstartseva Lena Startseva
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.