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

bson_append_code_with_scope drops empty scope

    XMLWordPrintable

    Details

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

      Description

      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);
         }
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-c-driver Backlog - C Driver Team
              Reporter:
              david.golden David Golden
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: