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

JSON_KEYS function accept an invalid json

    XMLWordPrintable

Details

    Description

      Hi,

      I found that the JSON_KEYS function can accept an invalid function and return a result:

      SELECT JSON_VALID('{"a":1} trailing'); -- 0
      SELECT JSON_TYPE('{"a":1} trailing'); -- NULL
      SHOW WARNINGS; -- Warning	4038	Syntax error in JSON text in argument 1 to function 'json_type' at position 9
       
      SELECT JSON_KEYS('{"a":1} trailing');-- ["a"]
      

      Attachments

        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.