Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-290

Problem with Query & hint (const string &jsonKeyPatt) with compound index in locale with comma as decimal point

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Implementation
    • Environment:
      Windows 2008 - German OS

      We have compound indexes like this:

      {containerpath_idx:1,name_idx:1,ismanaged_idx:1}

      When we are in German locale and pass this as a string to this method:

      Query & hint (const string &jsonKeyPatt)

      it throws an exception (FailedToParse: Expecting '}' or ',') because the parse method in json.cpp uses strtod() to parse the numbers. In any locale that uses commas as decimal places the parsing does not work because strtod() strips the comma as part of the number.

      As a workaround we will use the hint() method that takes a BSON object.

      I'm not sure if there are other places where this will cause issues.

            Assignee:
            Unassigned Unassigned
            Reporter:
            judsonp Paul Judson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: