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

[BP to 7.1.5 MB-56120 ] Possible incorrect results from OBJECT_ functions

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 7.1.5
    • 7.1.4, 7.1.3
    • query
    • Security Level: Public
    • Untriaged
    • 0
    • Unknown

    Description

      SELECT COUNT(1)
      FROM OBJECT TO_STR(pos): {"a": OBJECT TO_STR(pos2): {"c":v} FOR pos2:v1 IN ARRAY_RANGE(0,50) END} FOR pos:v IN ARRAY_RANGE(0,50) END AS d
      UNNEST OBJECT_VALUES(d) AS u1
      UNNEST OBJECT_VALUES(u1.a) AS u2
      UNNEST OBJECT_NAMES(d) AS u3;

      It suppose to give 125000 (50*50*50)

      each time gives random value

       

       

      Affected functions :

      OBJECT_INNER_PAIRS()
      OBJECT_INNER_VALUES()
      OBJECT_NAMES()
      OBJECT_PAIRS()
      OBJECT_VALUES()

      Issue Resolution
      The values returned by the OBJECT_ functions were erroneously pooled and reused by subsequent invocations. Depending on when values were reused, the original results were overwritten. Pooling has been removed eliminating the chance that values are overwritten.

      Attachments

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

        Activity

          People

            pierre.regazzoni Pierre Regazzoni
            Sitaram.Vemulapalli Sitaram Vemulapalli
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty