Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-1878

bson_append_code_with_scope drops empty scope

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.5.0
    • Affects Version/s: None
    • Component/s: libbson
    • Labels:
      None

      If the scope is empty, bson_append_code_with_scope delegates instead to bson_append_code, changing the requested type.

      This behavior is undocumented.

      The offending lines appear to be 955-957 in bson.c:

         if (bson_empty0 (scope)) {
            return bson_append_code (bson, key, key_length, javascript);
         }
      

            Assignee:
            backlog-c-driver [DO NOT USE] Backlog - C Driver Team
            Reporter:
            david.golden@mongodb.com David Golden
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: