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

JSON_SCHEMA_VALID: schema with multipleOf for big value always return 1

    XMLWordPrintable

Details

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

    Description

      The big value dependencies on multipleOf. So, for example, for multipleOf=2 the big values starts from 9007900000000001:

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

      Actual result:

      SELECT JSON_SCHEMA_VALID(@schema, '9006999999999999');
      JSON_SCHEMA_VALID(@schema, '9006999999999999')
      0
      SELECT JSON_SCHEMA_VALID(@schema, '9007900000000001');
      JSON_SCHEMA_VALID(@schema, '9007900000000001')
      1
      

      Expected result:

      SELECT JSON_SCHEMA_VALID(@schema, '9006999999999999');
      JSON_SCHEMA_VALID(@schema, '9006999999999999')
      0
      SELECT JSON_SCHEMA_VALID(@schema, '9007900000000001');
      JSON_SCHEMA_VALID(@schema, '9007900000000001')
      0
      

      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.