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

Covered Index Join returns wrong results

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 4.6.3, 5.0.0
    • 4.6.0, 4.6.2
    • query
    • None
    • Triaged
    • Unknown

    Description

       
      INSERT INTO default VALUES ("f001", { "parent": "1496116023888_5a14fc5c-e29a-4fd8-90c4-e052748ff01c", "deleted": false }),
                          VALUES ("f002", { "parent": "1496116023888_5a14fc5c-e29a-4fd8-90c4-e052748ff01c", "deleted": true, "abc": 1 }),
                          VALUES ( "1496116023888_5a14fc5c-e29a-4fd8-90c4-e052748ff01c", { "metadata": { "published": 1496116023888}, "tag": { "expiryepoch": 1496202423888, "token": "c7468adf-ac8a-4551-a4fa-3b136f9d76ca" } });
      CREATE INDEX ix1 ON default(tag.token, tag.expiryepoch, metadata.published, metadata.deleted);
      CREATE INDEX ix2 ON default(parent,abc);
      select 1 from default a JOIN default b ON KEY b.parent FOR a where a.tag.token = 'c7468adf-ac8a-4551-a4fa-3b136f9d76ca' and a.tag.expiryepoch > 1 and a.metadata.published > 1 and b.abc = 1;
      

      Above covered query can give 0 or 2 results. It should return one. non covered query gives 1 result.

      https://forums.couchbase.com/t/bug-with-select-1/12977/5

      Attachments

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

        Activity

          People

            ajay.bhullar Ajay Bhullar
            Sitaram.Vemulapalli Sitaram Vemulapalli
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty