Uploaded image for project: 'Couchbase Lite'
  1. Couchbase Lite
  2. CBL-3871

QueryParams fails to decode bool

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 3.0.15
    • 3.0.2
    • LiteCore
    • Security Level: Public
    • None
    • LiteCore 93
    • 5

    Description

      [2022-11-07T10:04:30.059Z] 2022-11-07 02:04:30.013827-0800 xctest[43650:11052142] Query explain: params: {
      [2022-11-07T10:04:30.059Z]     city = "santa clara";
      [2022-11-07T10:04:30.059Z]     code = 100;
      [2022-11-07T10:04:30.059Z]     gpa = 4;
      [2022-11-07T10:04:30.059Z]     id = 123456791;
      [2022-11-07T10:04:30.059Z]     isFullTime = 1;
      [2022-11-07T10:04:30.059Z]     score = 60;
      [2022-11-07T10:04:30.059Z]     startDate = "2022-10-24T10:04:30.011Z";
      [2022-11-07T10:04:30.059Z]     year = 2016;
      [2022-11-07T10:04:30.059Z] } SELECT fl_result(fl_root(testdb.body)) FROM kv_default AS testdb WHERE (((((((fl_value(testdb.body, 'city') = $_city AND fl_value(testdb.body, 'code') > $_code) AND fl_value(testdb.body, 'year') > $_year) AND fl_value(testdb.body, 'id') > $_id) AND fl_value(testdb.body, 'score') > $_score) AND fl_value(testdb.body, 'gpa') >= $_gpa) AND fl_value(testdb.body, 'isFullTime') = $_isFullTime) AND fl_value(testdb.body, 'startDate') > $_startDate) AND (testdb.flags & 1 = 0)
      [2022-11-07T10:04:30.059Z] 
      [2022-11-07T10:04:30.059Z] 2|0|0| SCAN TABLE kv_default AS testdb
      [2022-11-07T10:04:30.059Z] 
      [2022-11-07T10:04:30.059Z] {"WHAT":[["."]],"WHERE":["AND",["AND",["AND",["AND",["AND",["AND",["AND",["=",[".city"],["$city"]],[">",[".code"],["$code"]]],[">",[".year"],["$year"]]],[">",[".id"],["$id"]]],[">",[".score"],["$score"]]],[">=",[".gpa"],["$gpa"]]],["=",[".isFullTime"],["$isFullTime"]]],[">",[".startDate"],["$startDate"]]],"FROM":[{"AS":"testdb"}]}
      

      returns results with isFullTime = false;

      [2022-11-07T10:04:30.059Z] 2022-11-07 02:04:30.015900-0800 xctest[43650:11052142] CouchbaseLite Query Info: {QueryEnum#60} Created on {Query#59} with 2 rows (216 bytes) in 0.563ms
      [2022-11-07T10:04:30.059Z] 2022-11-07 02:04:30.016224-0800 xctest[43650:11052142] CouchbaseLite Query Info: Beginning query enumeration (0x60b000383920)
      [2022-11-07T10:04:30.059Z] 2022-11-07 02:04:30.016490-0800 xctest[43650:11052142] CouchbaseLite Query Verbose: {QueryEnum#60} --> [{"score":65.92,"city":"santa clara","id":123456794,"code":105,"gpa":4.02,"isFullTime":false,"startDate":"2022-10-26T10:04:30.006Z","year":2017,"name":"Tom"}]
      [2022-11-07T10:04:30.059Z] 2022-11-07 02:04:30.016788-0800 xctest[43650:11052142] CouchbaseLite Query Verbose: {QueryEnum#60} --> [{"score":65.92,"city":"santa clara","id":123456796,"code":106,"gpa":4.02,"isFullTime":true,"startDate":"2022-10-25T10:04:30.006Z","year":2017,"name":"Casper"}]
      [2022-11-07T10:04:30.059Z] 2022-11-07 02:04:30.017014-0800 xctest[43650:11052142] CouchbaseLite Query Verbose: {QueryEnum#60} END
      

      Weird thing is, this happens only in Jenkins. Looks similar to CBL-3715.

      This will be critical fix, before a fix to customer for `release/lithium`.

      Attachments

        Issue Links

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

          Activity

            People

              jianmin.zhao Jianmin Zhao
              Jayahari.Vavachan Jay Vavachan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty