Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-20354

big integer: SELECT MININT returns wrong answer

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Duplicate
    • Major
    • feature-backlog
    • 4.5.1, 5.0.0, 6.6.0, 6.5.0, 7.0.0
    • query
    • None
    • 4.7.0-947 Enterprise Edition (build-947)

    Description

      SELECT MAXINT works correctly. SELECT MININT produces a number that is 1 too large. Possibly an overflow issue? MININT + 1 works fine.

      ~/code/spock $ curl http://localhost:8093/query/service -d "statement=select 9223372036854775807, -9223372036854775808"
      {
      "requestID": "39f3e47e-bc44-478d-a0aa-04086fe0671b",
      "signature":

      { "$1": "number", "$2": "number" }

      ,
      "results": [

      { "$1": 9223372036854775807, "$2": -9223372036854775807 }

      ],
      "status": "success",
      "metrics":

      { "elapsedTime": "632.565µs", "executionTime": "599.105µs", "resultCount": 1, "resultSize": 89 }

      }

      ~/code/spock $ curl http://localhost:8093/query/service -d "statement=select 9223372036854775807, -9223372036854775800"
      {
      "requestID": "ef23eb08-8a67-47da-a0b5-65dff90017c1",
      "signature":

      { "$1": "number", "$2": "number" }

      ,
      "results": [

      { "$1": 9223372036854775807, "$2": -9223372036854775800 }

      ],
      "status": "success",
      "metrics":

      { "elapsedTime": "606.95µs", "executionTime": "570.639µs", "resultCount": 1, "resultSize": 89 }

      }

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              Donald.haggart Donald Haggart
              johan.larson Johan Larson (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty