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

JSON_SCHEMA_VALID returns true on the JSON data that violate the structure and unique requirement

    XMLWordPrintable

Details

    Description

      Hi,

      I found that the JSON_SCHEMA_VALID function returns true on the JSON data that violate the structure and unique requirement.

      SET @schema = '{"type":"object","required":["str1","str1"]}';
      SELECT JSON_SCHEMA_VALID(@schema, '{"str1":"abc"}'); -- 1, expected 0 as these two string should be identical
       
      SET @schema = '{"type":"object","dependentRequired":{"a":["b","b"]}}';
      SELECT JSON_SCHEMA_VALID(@schema, '{"a":1,"b":2}'); -- 1, expected 0 as child should be an array
      

      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.