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

field has \n LIKE gives wrong results index vs non index scan(primary)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Morpheus
    • 6.5.1, Cheshire-Cat
    • query
    • None
    • Untriaged
    • 1
    • Unknown

    Description

      The \n makes difference.

      insert into default values("kk20",{"text":"[[File:River \nFile Thames"});
      select * from default USE KEYS "kk20" WHERE text LIKE "Fil%";
      

      Above query returns results. Is this expected ? If yes

      CREATE INDEX ix20 ON default(text);
      select * from default WHERE text LIKE "Fil%";
      

      With Index scan returns 0 results because we used prefix Scan which doesn't match with runtime LIKE evaluation.

      If Indexscan result in wrong results we should not use that index.

      Attachments

        Issue Links

          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:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty