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

COUNT on Index FullScan gives wrong results

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 6.5.0
    • 5.5.5, 6.5.0
    • secondary-index
    • None
    • Untriaged
    • Yes

    Description

      Repro:

      INSERT INTO default VALUES ("k01",{"date": "2019-08-09T05:25:40.78-07:00","type": "test"});
      create index ix1 ON default (date DESC) WHERE type = "test";
      SELECT COUNT(1) FROM default WHERE date IS NOT MISSING AND type = "test";
      

      Above query returns 0 (wrong results), Below query returns 1 (right results)
      Both uses right plan and uses index aggregation.

      SELECT COUNT(1) FROM default WHERE date IS NOT NULL AND type = "test";
      

      Attachments

        Issue Links

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

          Activity

            People

              r.kalyanasundaram Ramalingam Kalyanasundaram [X] (Inactive)
              deepkaran.salooja Deepkaran Salooja
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty