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

Incorrect result of JSON_NORMALIZE on invalid json data

    XMLWordPrintable

Details

    Description

      Hi,

      I found that JSON_NORMALIZE can return an incorrect result on invalid JSON data. This is an example:

      SELECT JSON_NORMALIZE('{"a":1}0junk'); -- NULL
      SELECT JSON_VALID(CONVERT(CONCAT('{"a":1}', CHAR(0), 'junk') USING latin1));  -- 0
      SELECT JSON_NORMALIZE(CONVERT(CONCAT('{"a":1}', CHAR(0), 'junk') USING latin1)); -- {"a":1.0E0}
      

      Attachments

        Issue Links

          Activity

            People

              gkodinov Georgi Kodinov
              ChiZhang Chi Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.