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

Incorrect result for "SELECT JSON_SCHEMA_VALID('{}', NULL)"

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 11.1.1
    • JSON
    • None

    Description

      If at least one of the arguments is NULL, the function returns NULL.

      (https://dev.mysql.com/doc/refman/8.0/en/json-validation-functions.html)

      So for case:

      SELECT JSON_SCHEMA_VALID('{}', NULL);
      

      Expected result:

      JSON_SCHEMA_VALID('{}', NULL)
      NULL
      

      Actual result:

      JSON_SCHEMA_VALID('{}', NULL)
      1
      

      Full MTR case for NULL:

      SELECT JSON_SCHEMA_VALID(NULL, NULL);
      SELECT JSON_SCHEMA_VALID('{}', NULL);
      SELECT JSON_SCHEMA_VALID(NULL, '{}');
      

      Attachments

        Issue Links

          Activity

            People

              rucha174 Rucha Deodhar
              lstartseva Lena Startseva
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.