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

JSON_SCHEMA_VALID: multipleOf must be greater than zero

Details

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

    Description

      multipleOf

      The value of "multipleOf" MUST be a number, strictly greater than 0.

      https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.6.2.1

      Case:

      SET @schema = '{
                        "multipleOf": 0
                      }';
      SELECT JSON_SCHEMA_VALID(@schema, '2');
      

      Expected that there will be a warning, but actual result is:

      JSON_SCHEMA_VALID(@schema, '2')
      0
      

      Also maybe a value like 0.1("multipleOf": 0.1) needs to be checked but I'm not sure

      Attachments

        Issue Links

          Activity

            lstartseva Lena Startseva created issue -
            lstartseva Lena Startseva made changes -
            Field Original Value New Value
            lstartseva Lena Startseva made changes -
            Description *multipleOf*

            ??The value of "multipleOf" MUST be a number, strictly greater than 0. ??

            https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.6.2.1

            Case:
            {code:sql}
            SET @schema = '{
                              "multipleOf": 0
                            }';
            SELECT JSON_SCHEMA_VALID(@schema, '2');
            {code}

            Expected that there will be a warning, but actual result is:
            {code:sql}
            JSON_SCHEMA_VALID(@schema, '2')
            0
            {code}

            Also maybe a value like 0.1("multipleOf": 0.1) needs to be checked but I'm not sure
            *multipleOf*

            ??The value of "multipleOf" MUST be a number, strictly greater than 0.??

            https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.6.2.1

            Case:
            {code:sql}
            SET @schema = '{
                              "multipleOf": 0
                            }';
            SELECT JSON_SCHEMA_VALID(@schema, '2');
            {code}

            Expected that there will be a warning, but actual result is:
            {code:sql}
            JSON_SCHEMA_VALID(@schema, '2')
            0
            {code}

            Also maybe a value like 0.1("multipleOf": 0.1) needs to be checked but I'm not sure
            lstartseva Lena Startseva made changes -
            Assignee Rucha Deodhar [ rucha174 ]
            rucha174 Rucha Deodhar made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            rucha174 Rucha Deodhar made changes -
            Assignee Rucha Deodhar [ rucha174 ] Alexey Botchkov [ holyfoot ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            holyfoot Alexey Botchkov made changes -
            Assignee Alexey Botchkov [ holyfoot ] Rucha Deodhar [ rucha174 ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            rucha174 Rucha Deodhar made changes -
            Fix Version/s 11.1.1 [ 28704 ]
            Fix Version/s 11.1 [ 28549 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]

            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.