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

Using JSON_KEY_VALUE in subquery truncates the result

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 11.4, 11.8, 12.3
    • 11.4, 11.8, 12.3
    • JSON
    • None

    Description

      Hi,

      I found that when using the JSON_KEY_VALUE function in a subquery truncates the result, this test case can reproduce this:

      SELECT JSON_KEY_VALUE('{"a":1}', '$') AS direct_result; -- [{"key": "a", "value": 1}]
      SELECT x, LENGTH(x) AS len FROM (SELECT JSON_KEY_VALUE('{"a":1}', '$') AS x) AS dt; -- [{"key": "a",   14
      

      I can reproduce this with the commit version f6e44c1b7819f9befa3824f07866822288231528 of MariaDB server in github repo.

      Attachments

        Issue Links

          Activity

            People

              rucha174 Rucha Deodhar
              ChiZhang Chi Zhang
              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.