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

query with empty span, aggregation and no group by might return no rows

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 5.5.0
    • 5.5.0
    • query
    • None
    • Untriaged
    • Centos 64-bit
    • Unknown

    Description

      CREATE INDEX ix1 ON default(c1);
      insert into default values("1",{"c1":5});
      insert into default values("2",{"c1":null});
      insert into default values("3",{"c1":null});
       
      curl -v http://Administrator:password@localhost:8093/query/service -H "Content-Type: application/json" -d '{"statement":"prepare p1 from select count(c1) from default where c1 = $name"}'
      curl -v http://Administrator:password@localhost:8093/query/service -H "Content-Type: application/json" -d '{"prepared":"p1","$name":null}'
      

      The second statement should return one document of value 0
      c1 = null never be true because nulls can't be compared

      Attachments

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

        Activity

          People

            korrigan.clark Korrigan Clark (Inactive)
            korrigan.clark Korrigan Clark (Inactive)
            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